Commit 742766aa authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Lee Jones

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: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 483e2dfd
...@@ -511,6 +511,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c, ...@@ -511,6 +511,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
regmap_irq_get_domain(tps65910->irq_data)); regmap_irq_get_domain(tps65910->irq_data));
if (ret < 0) { if (ret < 0) {
dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret); dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret);
tps65910_irq_exit(tps65910);
return ret; return ret;
} }
......
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