Skip to content

Commit

Permalink
mfd: Fix double free in wm8350 error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold authored and Samuel Ortiz committed May 20, 2012
1 parent fa648e5 commit 65ee362
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions drivers/mfd/wm8350-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,7 @@ static int wm8350_i2c_probe(struct i2c_client *i2c,
i2c_set_clientdata(i2c, wm8350);
wm8350->dev = &i2c->dev;

ret = wm8350_device_init(wm8350, i2c->irq, i2c->dev.platform_data);
if (ret < 0)
goto err;

return ret;

err:
regmap_exit(wm8350->regmap);
return ret;
return wm8350_device_init(wm8350, i2c->irq, i2c->dev.platform_data);
}

static int wm8350_i2c_remove(struct i2c_client *i2c)
Expand Down

0 comments on commit 65ee362

Please sign in to comment.