[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1337103940-31899-1-git-send-email-jhovold@gmail.com>
Date: Tue, 15 May 2012 19:45:40 +0200
From: Johan Hovold <jhovold@...il.com>
To: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Samuel Ortiz <sameo@...ux.intel.com>
Cc: patches@...nsource.wolfsonmicro.com, linux-kernel@...r.kernel.org,
Johan Hovold <jhovold@...il.com>
Subject: [PATCH] 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@...il.com>
---
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 271589f..a68aceb 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,
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)
--
1.7.8.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists