diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-08-09 02:52:16 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-08-12 05:28:14 -0400 |
commit | d0a11693967295772d2a7c22b6b37eb20684e709 (patch) | |
tree | f06b8c1faef0f39646da69c8712f270707120d85 /drivers/mfd | |
parent | a2cddb6e416721cfe07770c264100607997fd8cb (diff) |
mfd: Fix incorrect kfree(i2c) in wm8994-core i2c_driver probe
The i2c_client received in probe() should not be kfree()'d.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/wm8994-core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c index 69533f5ab03e..b3b2aaf89dbe 100644 --- a/drivers/mfd/wm8994-core.c +++ b/drivers/mfd/wm8994-core.c | |||
@@ -497,10 +497,8 @@ static int wm8994_i2c_probe(struct i2c_client *i2c, | |||
497 | struct wm8994 *wm8994; | 497 | struct wm8994 *wm8994; |
498 | 498 | ||
499 | wm8994 = kzalloc(sizeof(struct wm8994), GFP_KERNEL); | 499 | wm8994 = kzalloc(sizeof(struct wm8994), GFP_KERNEL); |
500 | if (wm8994 == NULL) { | 500 | if (wm8994 == NULL) |
501 | kfree(i2c); | ||
502 | return -ENOMEM; | 501 | return -ENOMEM; |
503 | } | ||
504 | 502 | ||
505 | i2c_set_clientdata(i2c, wm8994); | 503 | i2c_set_clientdata(i2c, wm8994); |
506 | wm8994->dev = &i2c->dev; | 504 | wm8994->dev = &i2c->dev; |