Skip to content
Commit 5692aeea authored by Lu Hongfei's avatar Lu Hongfei Committed by Bjorn Andersson
Browse files

soc: qcom: pmic: Fix resource leaks in a device_for_each_child_node() loop



The device_for_each_child_node loop should call fwnode_handle_put()
before return in the error cases, to avoid resource leaks.

Let's fix this bug in pmic_glink_altmode_probe().

Signed-off-by: default avatarLu Hongfei <luhongfei@vivo.com>
Link: https://lore.kernel.org/r/20230612133452.47315-1-luhongfei@vivo.com


[bjorn: Rebased patch, moved fw_handle_put() from jump target into the loop]
Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent d74612b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment