Unverified Commit 23942b71 authored by Felix Gu's avatar Felix Gu Committed by Mark Brown
Browse files

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: 3c36965d ("regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators")
Signed-off-by: default avatarFelix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260223-mt6363-v1-1-c99a2e8ac621@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 11439c46
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -899,10 +899,8 @@ static int mt6363_regulator_probe(struct platform_device *pdev)
					     "Failed to map IRQ%d\n", info->hwirq);

		ret = devm_add_action_or_reset(dev, mt6363_irq_remove, &info->virq);
		if (ret) {
			irq_dispose_mapping(info->hwirq);
		if (ret)
			return ret;
		}

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