diff options
Diffstat (limited to 'drivers/macintosh/windfarm_lm75_sensor.c')
-rw-r--r-- | drivers/macintosh/windfarm_lm75_sensor.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c index d8257d35afde..647c6add2193 100644 --- a/drivers/macintosh/windfarm_lm75_sensor.c +++ b/drivers/macintosh/windfarm_lm75_sensor.c | |||
@@ -107,10 +107,8 @@ static int wf_lm75_probe(struct i2c_client *client, | |||
107 | i2c_set_clientdata(client, lm); | 107 | i2c_set_clientdata(client, lm); |
108 | 108 | ||
109 | rc = wf_register_sensor(&lm->sens); | 109 | rc = wf_register_sensor(&lm->sens); |
110 | if (rc) { | 110 | if (rc) |
111 | i2c_set_clientdata(client, NULL); | ||
112 | kfree(lm); | 111 | kfree(lm); |
113 | } | ||
114 | 112 | ||
115 | return rc; | 113 | return rc; |
116 | } | 114 | } |
@@ -216,7 +214,6 @@ static int wf_lm75_remove(struct i2c_client *client) | |||
216 | /* release sensor */ | 214 | /* release sensor */ |
217 | wf_unregister_sensor(&lm->sens); | 215 | wf_unregister_sensor(&lm->sens); |
218 | 216 | ||
219 | i2c_set_clientdata(client, NULL); | ||
220 | return 0; | 217 | return 0; |
221 | } | 218 | } |
222 | 219 | ||