bus: qcom-ebi2: add missing of_node_put
Subsystems (2)
PATCH 1/1 bus: qcom-ebi2: add missing of_node_put
From: Junlin Yang <[email protected]>
Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle returns.
Generated by: scripts/coccinelle/iterators/for_each_child.cocci
Signed-off-by Junlin Yang <[email protected]>
--- 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
1.9.1
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 Tue, 16 Feb 2021 19:30:53 +0800 you wrote:
From: Junlin Yang <[email protected]>
Fix OF node leaks by calling
of_node_putinfor_each_available_child_of_nodewhen the cycle returns.Generated by:
scripts/coccinelle/iterators/for_each_child.cocci[...]
Here is the summary with links:
- bus: qcom-ebi2: add missing of_node_put
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