Skip to content

Commit

Permalink
regulator: qcom-labibb: Fix missing of_node_put() in qcom_labibb_regu…
Browse files Browse the repository at this point in the history
…lator_probe()

The reg_node needs to be released through of_node_put() in the error
handling path when of_irq_get_byname() failed.

Fixes: 390af53 ("regulator: qcom-labibb: Implement short-circuit and over-current IRQs")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20221203062109.115043-1-yuancan@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Yuan Can authored and Mark Brown committed Dec 7, 2022
1 parent 1d26338 commit cf34ac6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/regulator/qcom-labibb-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit cf34ac6

Please sign in to comment.