diff options
Diffstat (limited to 'drivers/regulator/max8649.c')
-rw-r--r-- | drivers/regulator/max8649.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index 3ebdf698c648..833aaedc7e64 100644 --- a/drivers/regulator/max8649.c +++ b/drivers/regulator/max8649.c | |||
@@ -356,6 +356,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client, | |||
356 | dev_info(info->dev, "Max8649 regulator device is detected.\n"); | 356 | dev_info(info->dev, "Max8649 regulator device is detected.\n"); |
357 | return 0; | 357 | return 0; |
358 | out: | 358 | out: |
359 | i2c_set_clientdata(client, NULL); | ||
359 | kfree(info); | 360 | kfree(info); |
360 | return ret; | 361 | return ret; |
361 | } | 362 | } |
@@ -367,9 +368,9 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client) | |||
367 | if (info) { | 368 | if (info) { |
368 | if (info->regulator) | 369 | if (info->regulator) |
369 | regulator_unregister(info->regulator); | 370 | regulator_unregister(info->regulator); |
371 | i2c_set_clientdata(client, NULL); | ||
370 | kfree(info); | 372 | kfree(info); |
371 | } | 373 | } |
372 | i2c_set_clientdata(client, NULL); | ||
373 | 374 | ||
374 | return 0; | 375 | return 0; |
375 | } | 376 | } |