aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max8649.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/max8649.c')
-rw-r--r--drivers/regulator/max8649.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index 3ebdf698c648..bfc4c5ffdc96 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -14,6 +14,7 @@
14#include <linux/i2c.h> 14#include <linux/i2c.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/regulator/driver.h> 16#include <linux/regulator/driver.h>
17#include <linux/slab.h>
17#include <linux/regulator/max8649.h> 18#include <linux/regulator/max8649.h>
18 19
19#define MAX8649_DCDC_VMIN 750000 /* uV */ 20#define MAX8649_DCDC_VMIN 750000 /* uV */
@@ -356,6 +357,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
356 dev_info(info->dev, "Max8649 regulator device is detected.\n"); 357 dev_info(info->dev, "Max8649 regulator device is detected.\n");
357 return 0; 358 return 0;
358out: 359out:
360 i2c_set_clientdata(client, NULL);
359 kfree(info); 361 kfree(info);
360 return ret; 362 return ret;
361} 363}
@@ -367,9 +369,9 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client)
367 if (info) { 369 if (info) {
368 if (info->regulator) 370 if (info->regulator)
369 regulator_unregister(info->regulator); 371 regulator_unregister(info->regulator);
372 i2c_set_clientdata(client, NULL);
370 kfree(info); 373 kfree(info);
371 } 374 }
372 i2c_set_clientdata(client, NULL);
373 375
374 return 0; 376 return 0;
375} 377}