diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-05-15 13:45:40 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-05-20 11:27:09 -0400 |
commit | 65ee362cb2c13bd164ade0eda66919a2e16d8a89 (patch) | |
tree | edbe7e94f7edbe996dfa834affd7b65b86c1dad7 /drivers/mfd/wm8350-i2c.c | |
parent | fa648e51f84d060ef991eeee4d7bacec45d7fbfd (diff) |
mfd: Fix double free in wm8350 error path
Fix double free in probe error path introduced by the recent conversion
of wm8350 to use regmap.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
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.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/mfd/wm8350-i2c.c b/drivers/mfd/wm8350-i2c.c index 271589f8e8e3..a68aceb4e48c 100644 --- a/drivers/mfd/wm8350-i2c.c +++ b/drivers/mfd/wm8350-i2c.c | |||
@@ -49,15 +49,7 @@ static int wm8350_i2c_probe(struct i2c_client *i2c, | |||
49 | i2c_set_clientdata(i2c, wm8350); | 49 | i2c_set_clientdata(i2c, wm8350); |
50 | wm8350->dev = &i2c->dev; | 50 | wm8350->dev = &i2c->dev; |
51 | 51 | ||
52 | ret = wm8350_device_init(wm8350, i2c->irq, i2c->dev.platform_data); | 52 | return wm8350_device_init(wm8350, i2c->irq, i2c->dev.platform_data); |
53 | if (ret < 0) | ||
54 | goto err; | ||
55 | |||
56 | return ret; | ||
57 | |||
58 | err: | ||
59 | regmap_exit(wm8350->regmap); | ||
60 | return ret; | ||
61 | } | 53 | } |
62 | 54 | ||
63 | static int wm8350_i2c_remove(struct i2c_client *i2c) | 55 | static int wm8350_i2c_remove(struct i2c_client *i2c) |