aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/stmfx.c
diff options
context:
space:
mode:
authorAmelie Delaunay <amelie.delaunay@st.com>2020-04-22 11:08:32 +0200
committerLee Jones <lee.jones@linaro.org>2020-05-26 10:51:21 +0100
commit60c2c4bcb9202acad4cc26af20b44b6bd7874f7b (patch)
treec31a2133b0785a4a59b8f940d1910b5267f2c0af /drivers/mfd/stmfx.c
parentmfd: stmfx: Reset chip on resume as supply was disabled (diff)
downloadlinux-dev-60c2c4bcb9202acad4cc26af20b44b6bd7874f7b.tar.xz
linux-dev-60c2c4bcb9202acad4cc26af20b44b6bd7874f7b.zip
mfd: stmfx: Fix stmfx_irq_init error path
In case the interrupt signal can't be configured, IRQ domain needs to be removed. Fixes: 06252ade9156 ("mfd: Add ST Multi-Function eXpander (STMFX) core driver") Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/stmfx.c')
-rw-r--r--drivers/mfd/stmfx.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mfd/stmfx.c b/drivers/mfd/stmfx.c
index fde6541e347c..1977fe95f876 100644
--- a/drivers/mfd/stmfx.c
+++ b/drivers/mfd/stmfx.c
@@ -287,14 +287,19 @@ static int stmfx_irq_init(struct i2c_client *client)
ret = regmap_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN, irqoutpin);
if (ret)
- return ret;
+ goto irq_exit;
ret = devm_request_threaded_irq(stmfx->dev, client->irq,
NULL, stmfx_irq_handler,
irqtrigger | IRQF_ONESHOT,
"stmfx", stmfx);
if (ret)
- stmfx_irq_exit(client);
+ goto irq_exit;
+
+ return 0;
+
+irq_exit:
+ stmfx_irq_exit(client);
return ret;
}