From: Jiri Slaby Date: Fri, 8 Dec 2006 10:38:26 +0000 (-0800) Subject: [PATCH] Char: mxser_new, don't check tty_unregister retval X-Git-Tag: v3.12-rc1~32302^2~222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ead568c9cdab2592abdbd1f023931665cc24b5db;p=kernel%2Fkernel-generic.git [PATCH] Char: mxser_new, don't check tty_unregister retval Like other drivers silently unregister_tty_driver and put_tty_driver. It shouldn't be busy when module release function is called, since we are not bsd, no refs shouldn't be held. Cc: Alan Cox Signed-off-by: Jiri Slaby Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c index 7da7177..47af0bb 100644 --- a/drivers/char/mxser_new.c +++ b/drivers/char/mxser_new.c @@ -2994,15 +2994,12 @@ static int __init mxser_module_init(void) static void __exit mxser_module_exit(void) { - int i, err; + unsigned int i; pr_debug("Unloading module mxser ...\n"); - err = tty_unregister_driver(mxvar_sdriver); - if (!err) - put_tty_driver(mxvar_sdriver); - else - printk(KERN_ERR "Couldn't unregister MOXA Smartio/Industio family serial driver\n"); + tty_unregister_driver(mxvar_sdriver); + put_tty_driver(mxvar_sdriver); for (i = 0; i < MXSER_BOARDS; i++) if (mxser_boards[i].board_type != -1)