diff options
author | Greg Kroah-Hartman | 2015-07-31 00:59:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-08-05 19:35:49 +0200 |
commit | f368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e (patch) | |
tree | a9ed27128f04f21ed0f205ec94a1ad0dbf746bb4 /drivers/char/misc.c | |
parent | Drivers: hv: vmbus: Consider ND NIC in binding channels to CPUs (diff) | |
download | kernel-qcow2-linux-f368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e.tar.gz kernel-qcow2-linux-f368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e.tar.xz kernel-qcow2-linux-f368ed6088ae9c1fbe1c897bb5f215ce5e63fa1e.zip |
char: make misc_deregister a void function
With well over 200+ users of this api, there are a mere 12 users that
actually checked the return value of this function. And all of them
really didn't do anything with that information as the system or module
was shutting down no matter what.
So stop pretending like it matters, and just return void from
misc_deregister(). If something goes wrong in the call, you will get a
WARNING splat in the syslog so you know how to fix up your driver.
Other than that, there's nothing that can go wrong.
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Neil Brown <neilb@suse.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Cc: David Teigland <teigland@redhat.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/misc.c')
-rw-r--r-- | drivers/char/misc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index c83ef9652bc9..8069b361b8dd 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -243,17 +243,15 @@ int misc_register(struct miscdevice * misc) * @misc: device to unregister * * Unregister a miscellaneous device that was previously - * successfully registered with misc_register(). Success - * is indicated by a zero return, a negative errno code - * indicates an error. + * successfully registered with misc_register(). */ -int misc_deregister(struct miscdevice *misc) +void misc_deregister(struct miscdevice *misc) { int i = DYNAMIC_MINORS - misc->minor - 1; if (WARN_ON(list_empty(&misc->list))) - return -EINVAL; + return; mutex_lock(&misc_mtx); list_del(&misc->list); @@ -261,7 +259,6 @@ int misc_deregister(struct miscdevice *misc) if (i < DYNAMIC_MINORS && i >= 0) clear_bit(i, misc_minors); mutex_unlock(&misc_mtx); - return 0; } EXPORT_SYMBOL(misc_register); |