Commit 60c2c4bc authored by Amelie Delaunay's avatar Amelie Delaunay Committed by Lee Jones

mfd: stmfx: Fix stmfx_irq_init error path

In case the interrupt signal can't be configured, IRQ domain needs to be
removed.

Fixes: 06252ade ("mfd: Add ST Multi-Function eXpander (STMFX) core driver")
Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent e583649d
...@@ -287,14 +287,19 @@ static int stmfx_irq_init(struct i2c_client *client) ...@@ -287,14 +287,19 @@ static int stmfx_irq_init(struct i2c_client *client)
ret = regmap_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN, irqoutpin); ret = regmap_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN, irqoutpin);
if (ret) if (ret)
return ret; goto irq_exit;
ret = devm_request_threaded_irq(stmfx->dev, client->irq, ret = devm_request_threaded_irq(stmfx->dev, client->irq,
NULL, stmfx_irq_handler, NULL, stmfx_irq_handler,
irqtrigger | IRQF_ONESHOT, irqtrigger | IRQF_ONESHOT,
"stmfx", stmfx); "stmfx", stmfx);
if (ret) if (ret)
stmfx_irq_exit(client); goto irq_exit;
return 0;
irq_exit:
stmfx_irq_exit(client);
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