Re: [PATCH 2/6] drivers/mfd: drop frees of devm allocated data

From: Julia . Lawall
Date: Mon Aug 06 2012 - 16:03:56 EST


Quoting Dan Carpenter <dan.carpenter@xxxxxxxxxx>:

On Sat, Aug 04, 2012 at 06:50:45PM +0200, Julia Lawall wrote:
diff --git a/drivers/mfd/88pm80x.c b/drivers/mfd/88pm80x.c
index cd0bf52..2bd090e 100644
--- a/drivers/mfd/88pm80x.c
+++ b/drivers/mfd/88pm80x.c
@@ -45,17 +45,14 @@ int __devinit pm80x_init(struct i2c_client *client,

map = devm_regmap_init_i2c(client, &pm80x_regmap_config);
if (IS_ERR(map)) {
- ret = PTR_ERR(map);
dev_err(&client->dev, "Failed to allocate register map: %d\n",
ret);
^^^
The ret = PTR_ERR(map); is still needed for the error message.

Good point. Thanks. I will fix it as soon as possible, at the end of the week.

julia

- goto err_regmap_init;
+ return PTR_ERR(map);
}

regards,
dan carpenter






--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/