Skip to content

Commit 60c2c4b

Browse files
ADESTMLee Jones
authored andcommitted
mfd: stmfx: Fix stmfx_irq_init error path
In case the interrupt signal can't be configured, IRQ domain needs to be removed. Fixes: 06252ad ("mfd: Add ST Multi-Function eXpander (STMFX) core driver") Signed-off-by: Amelie Delaunay <[email protected]> Signed-off-by: Lee Jones <[email protected]>
1 parent e583649 commit 60c2c4b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/mfd/stmfx.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,14 +287,19 @@ static int stmfx_irq_init(struct i2c_client *client)
287287

288288
ret = regmap_write(stmfx->map, STMFX_REG_IRQ_OUT_PIN, irqoutpin);
289289
if (ret)
290-
return ret;
290+
goto irq_exit;
291291

292292
ret = devm_request_threaded_irq(stmfx->dev, client->irq,
293293
NULL, stmfx_irq_handler,
294294
irqtrigger | IRQF_ONESHOT,
295295
"stmfx", stmfx);
296296
if (ret)
297-
stmfx_irq_exit(client);
297+
goto irq_exit;
298+
299+
return 0;
300+
301+
irq_exit:
302+
stmfx_irq_exit(client);
298303

299304
return ret;
300305
}

0 commit comments

Comments
 (0)