diff mbox series

regulator: qcom-labibb: Fix missing of_node_put() in qcom_labibb_regulator_probe()

Message ID 20221203062109.115043-1-yuancan@huawei.com (mailing list archive)
State Not Applicable
Headers show
Series regulator: qcom-labibb: Fix missing of_node_put() in qcom_labibb_regulator_probe() | expand

Commit Message

Yuan Can Dec. 3, 2022, 6:21 a.m. UTC
The reg_node needs to be released through of_node_put() in the error
handling path when of_irq_get_byname() failed.

Fixes: 390af53e0411 ("regulator: qcom-labibb: Implement short-circuit and over-current IRQs")
Signed-off-by: Yuan Can <yuancan@huawei.com>
---
 drivers/regulator/qcom-labibb-regulator.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown Dec. 7, 2022, 4:20 p.m. UTC | #1
On Sat, 03 Dec 2022 06:21:09 +0000, Yuan Can wrote:
> The reg_node needs to be released through of_node_put() in the error
> handling path when of_irq_get_byname() failed.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/1] regulator: qcom-labibb: Fix missing of_node_put() in qcom_labibb_regulator_probe()
      commit: cf34ac6aa2b12fb0c3aacfdcae8acd7904b949ec

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/regulator/qcom-labibb-regulator.c b/drivers/regulator/qcom-labibb-regulator.c
index 639b71eb41ff..bcf7140f3bc9 100644
--- a/drivers/regulator/qcom-labibb-regulator.c
+++ b/drivers/regulator/qcom-labibb-regulator.c
@@ -822,6 +822,7 @@  static int qcom_labibb_regulator_probe(struct platform_device *pdev)
 			if (irq == 0)
 				irq = -EINVAL;
 
+			of_node_put(reg_node);
 			return dev_err_probe(vreg->dev, irq,
 					     "Short-circuit irq not found.\n");
 		}