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 <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: Oleg Drokin <[email protected]>
Cc: Andreas Dilger <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Wim Van Sebroeck <[email protected]>
Cc: Christine Caulfield <[email protected]>
Cc: David Teigland <[email protected]>
Cc: Mark Fasheh <[email protected]>
Acked-by: Joel Becker <[email protected]>
Acked-by: Alexandre Belloni <[email protected]>
Acked-by: Alessandro Zummo <[email protected]>
Acked-by: Mike Snitzer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Greg Kroah-Hartman 2015-07-30 15:59:57 -07:00
commit f368ed6088
16 changed files with 27 additions and 59 deletions

View file

@ -1031,14 +1031,9 @@ int __init vmci_host_init(void)
void __exit vmci_host_exit(void)
{
int error;
vmci_host_device_initialized = false;
error = misc_deregister(&vmci_host_miscdev);
if (error)
pr_warn("Error unregistering character device: %d\n", error);
misc_deregister(&vmci_host_miscdev);
vmci_ctx_destroy(host_context);
vmci_qp_broker_exit();