diff options
Diffstat (limited to 'drivers/regulator/max1586.c')
-rw-r--r-- | drivers/regulator/max1586.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index a49fc952c9a..b3c1afc1688 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c @@ -22,6 +22,7 @@ #include <linux/i2c.h> #include <linux/platform_device.h> #include <linux/regulator/driver.h> +#include <linux/slab.h> #include <linux/regulator/max1586.h> #define MAX1586_V3_MAX_VSEL 31 @@ -243,8 +244,8 @@ static int __devexit max1586_pmic_remove(struct i2c_client *client) for (i = 0; i <= MAX1586_V6; i++) if (rdev[i]) regulator_unregister(rdev[i]); - kfree(rdev); i2c_set_clientdata(client, NULL); + kfree(rdev); return 0; } |