Skip to contentSkip to conversation

mfd: Fix double free in wm8350 error path

PATCH Applied Johan Hovold 3 participants 3 messages May 15, 2012 – May 18, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/mfd/wm8350-i2c.c |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
drivers/mfd/wm8350-i2c.c +1 -9
index 271589f..a68aceb 100644
@@ -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)
Signature · 1 line
1.7.8.5
Applied
#2 lore raw
In reply to Johan Hovold

Hi Johan,

Quoted 2 lines · Johan Hovold

Fix double free in probe error path introduced by the recent conversion of wm8350 to use regmap.

Applied, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/