]> err.no Git - linux-2.6/commitdiff
[PATCH] macintosh: don't store i2c_add_driver() return if no further processing done
authorArthur Othieno <a.othieno@bluewin.ch>
Fri, 6 Jan 2006 08:11:29 +0000 (00:11 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:30 +0000 (08:33 -0800)
therm_pm72.c and windfarm_lm75_sensor.c both store the return from
i2c_add_driver() but do no further processing on the result.  Simply return
what i2c_add_driver() did, instead.

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/macintosh/therm_pm72.c
drivers/macintosh/windfarm_lm75_sensor.c

index 190878eef9903e1ec8a4c2e938772ab06ae8a0d9..435427daed75cd841ff5d8ffd5ba421f75859149 100644 (file)
@@ -1988,18 +1988,13 @@ static void fcu_lookup_fans(struct device_node *fcu_node)
 
 static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
 {
-       int rc;
-
        state = state_detached;
 
        /* Lookup the fans in the device tree */
        fcu_lookup_fans(dev->node);
 
        /* Add the driver */
-       rc = i2c_add_driver(&therm_pm72_driver);
-       if (rc < 0)
-               return rc;
-       return 0;
+       return i2c_add_driver(&therm_pm72_driver);
 }
 
 static int fcu_of_remove(struct of_device* dev)
index a0a41ad0f2b593b7eadf0320b7c121710e9004b6..c62ed68a3138e4bad2888557796bc5fffee223f0 100644 (file)
@@ -240,12 +240,7 @@ static int wf_lm75_detach(struct i2c_client *client)
 
 static int __init wf_lm75_sensor_init(void)
 {
-       int rc;
-
-       rc = i2c_add_driver(&wf_lm75_driver);
-       if (rc < 0)
-               return rc;
-       return 0;
+       return i2c_add_driver(&wf_lm75_driver);
 }
 
 static void __exit wf_lm75_sensor_exit(void)