[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1394639445-7737-2-git-send-email-k.kozlowski@samsung.com>
Date: Wed, 12 Mar 2014 16:50:45 +0100
From: Krzysztof Kozlowski <k.kozlowski@...sung.com>
To: Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org
Cc: Krzysztof Kozlowski <k.kozlowski@...sung.com>
Subject: [PATCH 2/2] mfd: tps65910: Fix regmap_irq_chip_data leak on
mfd_add_devices fail
The tps65910_i2c_probe() allocates regmap_irq_chip in
tps65910_irq_init() but it does not clean this up in case of
mfd_add_devices() failure.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
---
drivers/mfd/tps65910.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index d6573318977f..460a014ca629 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -507,14 +507,15 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
ret = mfd_add_devices(tps65910->dev, -1,
tps65910s, ARRAY_SIZE(tps65910s),
NULL, 0,
regmap_irq_get_domain(tps65910->irq_data));
if (ret < 0) {
dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret);
+ tps65910_irq_exit(tps65910);
return ret;
}
return ret;
}
static int tps65910_i2c_remove(struct i2c_client *i2c)
--
1.7.9.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