bus: qcom: ebi2: fix device node iterator leak
Subsystems (2)
PATCH 1/1 bus: qcom: ebi2: fix device node iterator leak
In the for_each_available_child_of_node loop of qcom_ebi2_probe, add a call to of_node_put to avoid leaking the iterator if we bail out.
--- drivers/bus/qcom-ebi2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/bus/qcom-ebi2.c +3 -1
@@ -353,8 +353,10 @@ static int qcom_ebi2_probe(struct platform_device *pdev)/* Figure out the chipselect */ ret =of_property_read_u32 (child,"reg" , &csindex); -if (ret) +if (ret) { +of_node_put (child);return ret; + }if (csindex >5 ) { dev_err(dev,
Signature · 1 line
2.20.1
Quoted 6 lines · Tobias Jordan
In the
for_each_available_child_of_nodeloop ofqcom_ebi2_probe, add a call toof_node_putto avoid leaking the iterator if we bail out.Fixes 335a12754808 ("bus: qcom: add EBI2 driver")Signed-off-by Tobias Jordan <[email protected]>
Bjorn can you apply this to the Qualcomm SoC tree?
Yours,
Linus Walleij
This patch was applied to qcom/linux.git (refs/heads/for-next):
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
Quoted 8 lines · On Sat, 26 Sep 2020 01:45:04 +0200 you wrote:
In the
for_each_available_child_of_nodeloop ofqcom_ebi2_probe, add a call toof_node_putto avoid leaking the iterator if we bail out.Fixes 335a12754808 ("bus: qcom: add EBI2 driver")Signed-off-by Tobias Jordan <[email protected]>[...]
Here is the summary with links:
- bus: qcom: ebi2: fix device node iterator leak
https://git.kernel.org/qcom/c/4f26f0c36fe2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html