* [PATCH 1/2] mmc: cavium-octeon: Add of_node_put() when breaking out of loop
@ 2022-07-19 9:52 Liang He
2022-07-19 9:52 ` [PATCH 2/2] mmc: cavium-thunderx: " Liang He
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Liang He @ 2022-07-19 9:52 UTC (permalink / raw)
To: rric, ulf.hansson, linux-mmc, windhl
In octeon_mmc_probe(), we should call of_node_put() when breaking
out of for_each_child_of_node() which has increased and decreased
the refcount during each iteration.
Fixes: 01d95843335c ("mmc: cavium: Add MMC support for Octeon SOCs.")
Signed-off-by: Liang He <windhl@126.com>
---
drivers/mmc/host/cavium-octeon.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
index 2c4b2df52adb..12dca91a8ef6 100644
--- a/drivers/mmc/host/cavium-octeon.c
+++ b/drivers/mmc/host/cavium-octeon.c
@@ -277,6 +277,7 @@ static int octeon_mmc_probe(struct platform_device *pdev)
if (ret) {
dev_err(&pdev->dev, "Error populating slots\n");
octeon_mmc_set_shared_power(host, 0);
+ of_node_put(cn);
goto error;
}
i++;
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] mmc: cavium-thunderx: Add of_node_put() when breaking out of loop
2022-07-19 9:52 [PATCH 1/2] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Liang He
@ 2022-07-19 9:52 ` Liang He
2022-07-20 11:35 ` Robert Richter
2022-07-21 16:13 ` Ulf Hansson
2022-07-20 11:35 ` [PATCH 1/2] mmc: cavium-octeon: " Robert Richter
2022-07-21 16:13 ` Ulf Hansson
2 siblings, 2 replies; 6+ messages in thread
From: Liang He @ 2022-07-19 9:52 UTC (permalink / raw)
To: rric, ulf.hansson, linux-mmc, windhl
In thunder_mmc_probe(), we should call of_node_put() when breaking
out of for_each_child_of_node() which has increased and decreased
the refcount during each iteration.
Fixes: 166bac38c3c5 ("mmc: cavium: Add MMC PCI driver for ThunderX SOCs")
Signed-off-by: Liang He <windhl@126.com>
---
drivers/mmc/host/cavium-thunderx.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
index 76013bbbcff3..202b1d6da678 100644
--- a/drivers/mmc/host/cavium-thunderx.c
+++ b/drivers/mmc/host/cavium-thunderx.c
@@ -142,8 +142,10 @@ static int thunder_mmc_probe(struct pci_dev *pdev,
continue;
ret = cvm_mmc_of_slot_probe(&host->slot_pdev[i]->dev, host);
- if (ret)
+ if (ret) {
+ of_node_put(child_node);
goto error;
+ }
}
i++;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mmc: cavium-octeon: Add of_node_put() when breaking out of loop
2022-07-19 9:52 [PATCH 1/2] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Liang He
2022-07-19 9:52 ` [PATCH 2/2] mmc: cavium-thunderx: " Liang He
@ 2022-07-20 11:35 ` Robert Richter
2022-07-21 16:13 ` Ulf Hansson
2 siblings, 0 replies; 6+ messages in thread
From: Robert Richter @ 2022-07-20 11:35 UTC (permalink / raw)
To: Liang He; +Cc: ulf.hansson, linux-mmc
On 19.07.22 17:52:15, Liang He wrote:
> In octeon_mmc_probe(), we should call of_node_put() when breaking
> out of for_each_child_of_node() which has increased and decreased
> the refcount during each iteration.
>
> Fixes: 01d95843335c ("mmc: cavium: Add MMC support for Octeon SOCs.")
> Signed-off-by: Liang He <windhl@126.com>
Acked-by: Robert Richter <rric@kernel.org>
> ---
> drivers/mmc/host/cavium-octeon.c | 1 +
> 1 file changed, 1 insertion(+)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mmc: cavium-thunderx: Add of_node_put() when breaking out of loop
2022-07-19 9:52 ` [PATCH 2/2] mmc: cavium-thunderx: " Liang He
@ 2022-07-20 11:35 ` Robert Richter
2022-07-21 16:13 ` Ulf Hansson
1 sibling, 0 replies; 6+ messages in thread
From: Robert Richter @ 2022-07-20 11:35 UTC (permalink / raw)
To: Liang He; +Cc: ulf.hansson, linux-mmc
On 19.07.22 17:52:16, Liang He wrote:
> In thunder_mmc_probe(), we should call of_node_put() when breaking
> out of for_each_child_of_node() which has increased and decreased
> the refcount during each iteration.
>
> Fixes: 166bac38c3c5 ("mmc: cavium: Add MMC PCI driver for ThunderX SOCs")
> Signed-off-by: Liang He <windhl@126.com>
Acked-by: Robert Richter <rric@kernel.org>
> ---
> drivers/mmc/host/cavium-thunderx.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] mmc: cavium-octeon: Add of_node_put() when breaking out of loop
2022-07-19 9:52 [PATCH 1/2] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Liang He
2022-07-19 9:52 ` [PATCH 2/2] mmc: cavium-thunderx: " Liang He
2022-07-20 11:35 ` [PATCH 1/2] mmc: cavium-octeon: " Robert Richter
@ 2022-07-21 16:13 ` Ulf Hansson
2 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2022-07-21 16:13 UTC (permalink / raw)
To: Liang He; +Cc: rric, linux-mmc
On Tue, 19 Jul 2022 at 11:52, Liang He <windhl@126.com> wrote:
>
> In octeon_mmc_probe(), we should call of_node_put() when breaking
> out of for_each_child_of_node() which has increased and decreased
> the refcount during each iteration.
>
> Fixes: 01d95843335c ("mmc: cavium: Add MMC support for Octeon SOCs.")
> Signed-off-by: Liang He <windhl@126.com>
Applied for next, thanks!
Kind regards
Ulf Hansson
> ---
> drivers/mmc/host/cavium-octeon.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
> index 2c4b2df52adb..12dca91a8ef6 100644
> --- a/drivers/mmc/host/cavium-octeon.c
> +++ b/drivers/mmc/host/cavium-octeon.c
> @@ -277,6 +277,7 @@ static int octeon_mmc_probe(struct platform_device *pdev)
> if (ret) {
> dev_err(&pdev->dev, "Error populating slots\n");
> octeon_mmc_set_shared_power(host, 0);
> + of_node_put(cn);
> goto error;
> }
> i++;
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mmc: cavium-thunderx: Add of_node_put() when breaking out of loop
2022-07-19 9:52 ` [PATCH 2/2] mmc: cavium-thunderx: " Liang He
2022-07-20 11:35 ` Robert Richter
@ 2022-07-21 16:13 ` Ulf Hansson
1 sibling, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2022-07-21 16:13 UTC (permalink / raw)
To: Liang He; +Cc: rric, linux-mmc
On Tue, 19 Jul 2022 at 11:52, Liang He <windhl@126.com> wrote:
>
> In thunder_mmc_probe(), we should call of_node_put() when breaking
> out of for_each_child_of_node() which has increased and decreased
> the refcount during each iteration.
>
> Fixes: 166bac38c3c5 ("mmc: cavium: Add MMC PCI driver for ThunderX SOCs")
> Signed-off-by: Liang He <windhl@126.com>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/cavium-thunderx.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
> index 76013bbbcff3..202b1d6da678 100644
> --- a/drivers/mmc/host/cavium-thunderx.c
> +++ b/drivers/mmc/host/cavium-thunderx.c
> @@ -142,8 +142,10 @@ static int thunder_mmc_probe(struct pci_dev *pdev,
> continue;
>
> ret = cvm_mmc_of_slot_probe(&host->slot_pdev[i]->dev, host);
> - if (ret)
> + if (ret) {
> + of_node_put(child_node);
> goto error;
> + }
> }
> i++;
> }
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-21 16:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 9:52 [PATCH 1/2] mmc: cavium-octeon: Add of_node_put() when breaking out of loop Liang He
2022-07-19 9:52 ` [PATCH 2/2] mmc: cavium-thunderx: " Liang He
2022-07-20 11:35 ` Robert Richter
2022-07-21 16:13 ` Ulf Hansson
2022-07-20 11:35 ` [PATCH 1/2] mmc: cavium-octeon: " Robert Richter
2022-07-21 16:13 ` Ulf Hansson
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.