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
@@ -1098,15 +1098,10 @@ static int chg_state(int index, unsigned char new_state, struct file *file)
|
||||
/* Cleanup */
|
||||
static void __exit viotap_exit(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
remove_proc_entry("iSeries/viotape", NULL);
|
||||
vio_unregister_driver(&viotape_driver);
|
||||
class_destroy(tape_class);
|
||||
ret = unregister_chrdev(VIOTAPE_MAJOR, "viotape");
|
||||
if (ret < 0)
|
||||
printk(VIOTAPE_KERN_WARN "Error unregistering device: %d\n",
|
||||
ret);
|
||||
unregister_chrdev(VIOTAPE_MAJOR, "viotape");
|
||||
if (viotape_unitinfo)
|
||||
dma_free_coherent(iSeries_vio_dev,
|
||||
sizeof(viotape_unitinfo[0]) * VIOTAPE_MAX_TAPE,
|
||||
|
Reference in New Issue
Block a user