diff options
Diffstat (limited to 'drivers/mfd/menelaus.c')
-rw-r--r-- | drivers/mfd/menelaus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index a94b131a18ef..721948be12c7 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c | |||
@@ -1228,6 +1228,7 @@ fail2: | |||
1228 | free_irq(client->irq, menelaus); | 1228 | free_irq(client->irq, menelaus); |
1229 | flush_scheduled_work(); | 1229 | flush_scheduled_work(); |
1230 | fail1: | 1230 | fail1: |
1231 | i2c_set_clientdata(client, NULL); | ||
1231 | kfree(menelaus); | 1232 | kfree(menelaus); |
1232 | return err; | 1233 | return err; |
1233 | } | 1234 | } |
@@ -1237,8 +1238,8 @@ static int __exit menelaus_remove(struct i2c_client *client) | |||
1237 | struct menelaus_chip *menelaus = i2c_get_clientdata(client); | 1238 | struct menelaus_chip *menelaus = i2c_get_clientdata(client); |
1238 | 1239 | ||
1239 | free_irq(client->irq, menelaus); | 1240 | free_irq(client->irq, menelaus); |
1240 | kfree(menelaus); | ||
1241 | i2c_set_clientdata(client, NULL); | 1241 | i2c_set_clientdata(client, NULL); |
1242 | kfree(menelaus); | ||
1242 | the_menelaus = NULL; | 1243 | the_menelaus = NULL; |
1243 | return 0; | 1244 | return 0; |
1244 | } | 1245 | } |