summaryrefslogtreecommitdiff
path: root/drivers/mfd/wm8350-i2c.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin@rab.in>2010-04-21 19:36:05 +0400
committerSamuel Ortiz <sameo@linux.intel.com>2010-05-28 03:37:41 +0400
commite47a3bbe4ffd4afe2b24c912598aee7ea1ecf738 (patch)
tree979a0aa286ab1d51fa572b514861b9f6cfe33883 /drivers/mfd/wm8350-i2c.c
parentfffba64ca37e8f06020f89e878f0d76a8e121c4e (diff)
downloadlinux-e47a3bbe4ffd4afe2b24c912598aee7ea1ecf738.tar.xz
mfd: Remove incorrect wm8350 kfree
The i2c_client received in probe() should not be kfree()'d. Signed-off-by: Rabin Vincent <rabin@rab.in> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm8350-i2c.c')
-rw-r--r--drivers/mfd/wm8350-i2c.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/wm8350-i2c.c b/drivers/mfd/wm8350-i2c.c
index aa3ba0974ee5..7795af4b1fe1 100644
--- a/drivers/mfd/wm8350-i2c.c
+++ b/drivers/mfd/wm8350-i2c.c
@@ -64,10 +64,8 @@ static int wm8350_i2c_probe(struct i2c_client *i2c,
int ret = 0;
wm8350 = kzalloc(sizeof(struct wm8350), GFP_KERNEL);
- if (wm8350 == NULL) {
- kfree(i2c);
+ if (wm8350 == NULL)
return -ENOMEM;
- }
i2c_set_clientdata(i2c, wm8350);
wm8350->dev = &i2c->dev;