Skip to content

Commit 23942b7

Browse files
outman119broonie
authored andcommitted
regulator: mt6363: Fix incorrect and redundant IRQ disposal in probe
In mt6363_regulator_probe(), devm_add_action_or_reset() is used to automatically dispose of the IRQ mapping if the probe fails or the device is removed. The manual call to irq_dispose_mapping() in the error path was redundant as the reset action already triggers mt6363_irq_remove(). Furthermore, the manual call incorrectly passed the hardware IRQ number (info->hwirq) instead of the virtual IRQ mapping (info->virq). Remove the redundant and incorrect manual disposal. Fixes: 3c36965 ("regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators") Signed-off-by: Felix Gu <ustc.gu@gmail.com> Link: https://patch.msgid.link/20260223-mt6363-v1-1-c99a2e8ac621@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 11439c4 commit 23942b7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/regulator/mt6363-regulator.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -899,10 +899,8 @@ static int mt6363_regulator_probe(struct platform_device *pdev)
899899
"Failed to map IRQ%d\n", info->hwirq);
900900

901901
ret = devm_add_action_or_reset(dev, mt6363_irq_remove, &info->virq);
902-
if (ret) {
903-
irq_dispose_mapping(info->hwirq);
902+
if (ret)
904903
return ret;
905-
}
906904

907905
config.driver_data = info;
908906
INIT_DELAYED_WORK(&info->oc_work, mt6363_oc_irq_enable_work);

0 commit comments

Comments
 (0)