All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bus: qcom: ebi2: fix device node iterator leak
@ 2020-09-25 23:45 Tobias Jordan
  2020-09-29 20:46 ` Linus Walleij
  2021-03-11 19:40 ` patchwork-bot+linux-arm-msm
  0 siblings, 2 replies; 3+ messages in thread
From: Tobias Jordan @ 2020-09-25 23:45 UTC (permalink / raw)
  To: linux-arm-msm, linux-kernel; +Cc: Andy Gross, Bjorn Andersson, Linus Walleij

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.

Fixes: 335a12754808 ("bus: qcom: add EBI2 driver")

Signed-off-by: Tobias Jordan <kernel@cdqe.de>
---
 drivers/bus/qcom-ebi2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/bus/qcom-ebi2.c b/drivers/bus/qcom-ebi2.c
index 03ddcf426887..0b8f53a688b8 100644
--- a/drivers/bus/qcom-ebi2.c
+++ b/drivers/bus/qcom-ebi2.c
@@ -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,
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] bus: qcom: ebi2: fix device node iterator leak
  2020-09-25 23:45 [PATCH] bus: qcom: ebi2: fix device node iterator leak Tobias Jordan
@ 2020-09-29 20:46 ` Linus Walleij
  2021-03-11 19:40 ` patchwork-bot+linux-arm-msm
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2020-09-29 20:46 UTC (permalink / raw)
  To: Tobias Jordan, Bjorn Andersson; +Cc: MSM, linux-kernel, Andy Gross

On Sat, Sep 26, 2020 at 1:45 AM Tobias Jordan <kernel@cdqe.de> wrote:

> 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.
>
> Fixes: 335a12754808 ("bus: qcom: add EBI2 driver")
>
> Signed-off-by: Tobias Jordan <kernel@cdqe.de>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Bjorn can you apply this to the Qualcomm SoC tree?

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] bus: qcom: ebi2: fix device node iterator leak
  2020-09-25 23:45 [PATCH] bus: qcom: ebi2: fix device node iterator leak Tobias Jordan
  2020-09-29 20:46 ` Linus Walleij
@ 2021-03-11 19:40 ` patchwork-bot+linux-arm-msm
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2021-03-11 19:40 UTC (permalink / raw)
  To: Tobias Jordan; +Cc: linux-arm-msm

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

On Sat, 26 Sep 2020 01:45:04 +0200 you wrote:
> 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.
> 
> Fixes: 335a12754808 ("bus: qcom: add EBI2 driver")
> 
> Signed-off-by: Tobias Jordan <kernel@cdqe.de>
> 
> [...]

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-11 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 23:45 [PATCH] bus: qcom: ebi2: fix device node iterator leak Tobias Jordan
2020-09-29 20:46 ` Linus Walleij
2021-03-11 19:40 ` patchwork-bot+linux-arm-msm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.