diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-08-09 14:52:16 +0800 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-08-12 11:28:14 +0200 |
commit | d0a11693967295772d2a7c22b6b37eb20684e709 (patch) | |
tree | f06b8c1faef0f39646da69c8712f270707120d85 /drivers/mfd/wm8994-core.c | |
parent | a2cddb6e416721cfe07770c264100607997fd8cb (diff) | |
download | blackbird-op-linux-d0a11693967295772d2a7c22b6b37eb20684e709.tar.gz blackbird-op-linux-d0a11693967295772d2a7c22b6b37eb20684e709.zip |
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/wm8994-core.c')
-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, struct wm8994 *wm8994; wm8994 = kzalloc(sizeof(struct wm8994), GFP_KERNEL); - if (wm8994 == NULL) { - kfree(i2c); + if (wm8994 == NULL) return -ENOMEM; - } i2c_set_clientdata(i2c, wm8994); wm8994->dev = &i2c->dev; |