lkml.org 
[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] tps65218.c: fix IRQ resource leak in tps65218_probe()
Date
Free allocated IRQ if reading the device ID fails.

Signed-off-by: Christian Hohnstaedt <Christian.Hohnstaedt@wago.com>
---
drivers/mfd/tps65218.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
index 910f569..19270bc 100644
--- a/drivers/mfd/tps65218.c
+++ b/drivers/mfd/tps65218.c
@@ -244,7 +244,7 @@ static int tps65218_probe(struct i2c_client *client,
ret = regmap_read(tps->regmap, TPS65218_REG_CHIPID, &chipid);
if (ret) {
dev_err(tps->dev, "Failed to read chipid: %d\n", ret);
- return ret;
+ goto err_irq;
}

tps->rev = chipid & TPS65218_CHIPID_REV_MASK;
--
2.7.4
\
 
 \ /
  Last update: 2018-12-06 10:58    [W:0.046 / U:2.464 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site