Commit c9662b4b authored by Arthur Othieno's avatar Arthur Othieno Committed by Linus Torvalds

[PATCH] macintosh: don't store i2c_add_driver() return if no further processing done

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: default avatarArthur Othieno <a.othieno@bluewin.ch>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e13ac219
...@@ -1988,18 +1988,13 @@ static void fcu_lookup_fans(struct device_node *fcu_node) ...@@ -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) static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
{ {
int rc;
state = state_detached; state = state_detached;
/* Lookup the fans in the device tree */ /* Lookup the fans in the device tree */
fcu_lookup_fans(dev->node); fcu_lookup_fans(dev->node);
/* Add the driver */ /* Add the driver */
rc = i2c_add_driver(&therm_pm72_driver); return i2c_add_driver(&therm_pm72_driver);
if (rc < 0)
return rc;
return 0;
} }
static int fcu_of_remove(struct of_device* dev) static int fcu_of_remove(struct of_device* dev)
......
...@@ -240,12 +240,7 @@ static int wf_lm75_detach(struct i2c_client *client) ...@@ -240,12 +240,7 @@ static int wf_lm75_detach(struct i2c_client *client)
static int __init wf_lm75_sensor_init(void) static int __init wf_lm75_sensor_init(void)
{ {
int rc; return i2c_add_driver(&wf_lm75_driver);
rc = i2c_add_driver(&wf_lm75_driver);
if (rc < 0)
return rc;
return 0;
} }
static void __exit wf_lm75_sensor_exit(void) static void __exit wf_lm75_sensor_exit(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment