unregister_chrdev(): ignore the return value
unregister_chrdev() always returns 0. There is no need to check the return value. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
cb00ea3528
commit
68fc4fabca
@@ -2684,8 +2684,7 @@ static void __exit ppp_cleanup(void)
|
||||
if (atomic_read(&ppp_unit_count) || atomic_read(&channel_count))
|
||||
printk(KERN_ERR "PPP: removing module but units remain!\n");
|
||||
cardmap_destroy(&all_ppp_units);
|
||||
if (unregister_chrdev(PPP_MAJOR, "ppp") != 0)
|
||||
printk(KERN_ERR "PPP: failed to unregister PPP device\n");
|
||||
unregister_chrdev(PPP_MAJOR, "ppp");
|
||||
device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0));
|
||||
class_destroy(ppp_class);
|
||||
}
|
||||
|
Reference in New Issue
Block a user