staging: comedi: return void from comedi_driver_unregister()
authorIan Abbott <abbotti@mev.co.uk>
Thu, 27 Jun 2013 13:50:57 +0000 (14:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 21:22:29 +0000 (14:22 -0700)
'Unregister' functions generally return `void`.
`comedi_driver_unregister()` currently returns an `int` errno value.
Nothing looks at the return value.  Change the return type to `void`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers.c

index ab278942ebd1fc3460f4185015409c23d6b35fb0..98058b9097e6197883f142a588835da6666166ad 100644 (file)
@@ -363,7 +363,7 @@ int comedi_auto_config(struct device *, struct comedi_driver *,
 void comedi_auto_unconfig(struct device *);
 
 int comedi_driver_register(struct comedi_driver *);
-int comedi_driver_unregister(struct comedi_driver *);
+void comedi_driver_unregister(struct comedi_driver *);
 
 /**
  * module_comedi_driver() - Helper macro for registering a comedi driver
index a15934f94ab0f1e1b6b8b2d18747f30cfd058403..ba5d6d927a498203fea0bdd6fc8dbde405bb3015 100644 (file)
@@ -559,7 +559,7 @@ int comedi_driver_register(struct comedi_driver *driver)
 }
 EXPORT_SYMBOL_GPL(comedi_driver_register);
 
-int comedi_driver_unregister(struct comedi_driver *driver)
+void comedi_driver_unregister(struct comedi_driver *driver)
 {
        struct comedi_driver *prev;
        int i;
@@ -584,15 +584,14 @@ int comedi_driver_unregister(struct comedi_driver *driver)
 
        if (comedi_drivers == driver) {
                comedi_drivers = driver->next;
-               return 0;
+               return;
        }
 
        for (prev = comedi_drivers; prev->next; prev = prev->next) {
                if (prev->next == driver) {
                        prev->next = driver->next;
-                       return 0;
+                       return;
                }
        }
-       return -EINVAL;
 }
 EXPORT_SYMBOL_GPL(comedi_driver_unregister);