Skip to content

Commit

Permalink
[PATCH] macintosh: don't store i2c_add_driver() return if no further …
Browse files Browse the repository at this point in the history
…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: 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>
  • Loading branch information
Arthur Othieno authored and Linus Torvalds committed Jan 6, 2006
1 parent e13ac21 commit c9662b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions drivers/macintosh/therm_pm72.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 1 addition & 6 deletions drivers/macintosh/windfarm_lm75_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c9662b4

Please sign in to comment.