Commit 65ee362c authored by Johan Hovold's avatar Johan Hovold Committed by Samuel Ortiz

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: default avatarJohan Hovold <jhovold@gmail.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent fa648e51
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment