mfd: tc3589x: Use devm_request_threaded_irq() to fix the missing undo bug
PATCH 1/1 mfd: tc3589x: Use devm_request_threaded_irq() to fix the missing undo bug
This driver calls request_threaded_irq() in probe, but it misses calling free_irq() in probe's error handler and remove.
Replace request_threaded_irq() with the devm version to fix it.
Fixes 20406ebff4a2 ("mfd/tc3589x: rename tc35892 structs/registers to tc359x")
Signed-off-by Chuhong Yuan <[email protected]>
--- drivers/mfd/tc3589x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/tc3589x.c +3 -3
@@ -412,9 +412,9 @@ static int tc3589x_probe(struct i2c_client *i2c,if (ret)return ret; - ret =request_threaded_irq (tc3589x->i2c->irq,NULL , tc3589x_irq, -IRQF_TRIGGER_FALLING |IRQF_ONESHOT , -"tc3589x" , tc3589x); + ret =devm_request_threaded_irq (&i2c->dev, tc3589x->i2c->irq,NULL , + tc3589x_irq,IRQF_TRIGGER_FALLING | +IRQF_ONESHOT ,"tc3589x" , tc3589x);if (ret) {dev_err (tc3589x->dev,"failed to request IRQ: %d\n" , ret);return ret;
Signature · 1 line
2.26.2