diff options
author | Jiri Slaby <jslaby@suse.cz> | 2021-03-02 09:22:04 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-10 11:34:09 +0300 |
commit | 6c2e6317c975c3cef1e08482a6ed8b734831ffbe (patch) | |
tree | 9229d440c0a9f38bbdbe6a94a3ab1c856d08ddde /drivers/tty/moxa.c | |
parent | ba444ea3bc9377c0445990da1ce7d5eb33b099d8 (diff) | |
download | linux-6c2e6317c975c3cef1e08482a6ed8b734831ffbe.tar.xz |
tty: do not check tty_unregister_driver's return value
These drivers check tty_unregister_driver return value. But they don't
handle a failure correctly (they free the driver in any case). So stop
checking tty_unregister_driver return value and remove also the prints.
In the next patch, tty_unregister_driver's return type will be switched
to void.
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org
Cc: Jiri Kosina <jikos@kernel.org>
Cc: David Sterba <dsterba@suse.com>
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210302062214.29627-34-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/moxa.c')
-rw-r--r-- | drivers/tty/moxa.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index 9f13f7d49dd7..32eb6b5e510f 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c @@ -1118,9 +1118,7 @@ static void __exit moxa_exit(void) del_timer_sync(&moxaTimer); - if (tty_unregister_driver(moxaDriver)) - printk(KERN_ERR "Couldn't unregister MOXA Intellio family " - "serial driver\n"); + tty_unregister_driver(moxaDriver); put_tty_driver(moxaDriver); } |