* [PATCH] clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
@ 2022-01-07 8:24 Miaoqian Lin
2022-01-12 2:51 ` Stephen Boyd
0 siblings, 1 reply; 4+ messages in thread
From: Miaoqian Lin @ 2022-01-07 8:24 UTC (permalink / raw)
Cc: linmq006, Peter De Schrijver, Prashant Gaikwad,
Michael Turquette, Stephen Boyd, Thierry Reding, Jonathan Hunter,
linux-clk, linux-tegra, linux-kernel
The reference taken by 'of_find_device_by_node()' must be released when
not needed anymore.
Add the corresponding 'put_device()' in the error handling path.
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
drivers/clk/tegra/clk-tegra124-emc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c
index 74c1d894cca8..219c80653dbd 100644
--- a/drivers/clk/tegra/clk-tegra124-emc.c
+++ b/drivers/clk/tegra/clk-tegra124-emc.c
@@ -198,6 +198,7 @@ static struct tegra_emc *emc_ensure_emc_driver(struct tegra_clk_emc *tegra)
tegra->emc = platform_get_drvdata(pdev);
if (!tegra->emc) {
+ put_device(&pdev->dev);
pr_err("%s: cannot find EMC driver\n", __func__);
return NULL;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
2022-01-07 8:24 [PATCH] clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver Miaoqian Lin
@ 2022-01-12 2:51 ` Stephen Boyd
2022-01-12 10:45 ` [PATCH v2] " Miaoqian Lin
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2022-01-12 2:51 UTC (permalink / raw)
To: Miaoqian Lin
Cc: linmq006, Peter De Schrijver, Prashant Gaikwad,
Michael Turquette, Thierry Reding, Jonathan Hunter, linux-clk,
linux-tegra, linux-kernel
Quoting Miaoqian Lin (2022-01-07 00:24:36)
> The reference taken by 'of_find_device_by_node()' must be released when
> not needed anymore.
> Add the corresponding 'put_device()' in the error handling path.
>
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Please send the mail To: somebody
Also, please add a Fixes: tag.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
2022-01-12 2:51 ` Stephen Boyd
@ 2022-01-12 10:45 ` Miaoqian Lin
2022-02-25 13:16 ` Thierry Reding
0 siblings, 1 reply; 4+ messages in thread
From: Miaoqian Lin @ 2022-01-12 10:45 UTC (permalink / raw)
To: sboyd
Cc: jonathanh, linmq006, linux-clk, linux-kernel, linux-tegra,
mturquette, pdeschrijver, pgaikwad, thierry.reding
The reference taken by 'of_find_device_by_node()' must be released when
not needed anymore.
Add the corresponding 'put_device()' in the error handling path.
Fixes: 2db04f16b589 ("clk: tegra: Add EMC clock driver")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
Changes in v2:
- add fixes tag.
---
drivers/clk/tegra/clk-tegra124-emc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c
index 74c1d894cca8..219c80653dbd 100644
--- a/drivers/clk/tegra/clk-tegra124-emc.c
+++ b/drivers/clk/tegra/clk-tegra124-emc.c
@@ -198,6 +198,7 @@ static struct tegra_emc *emc_ensure_emc_driver(struct tegra_clk_emc *tegra)
tegra->emc = platform_get_drvdata(pdev);
if (!tegra->emc) {
+ put_device(&pdev->dev);
pr_err("%s: cannot find EMC driver\n", __func__);
return NULL;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
2022-01-12 10:45 ` [PATCH v2] " Miaoqian Lin
@ 2022-02-25 13:16 ` Thierry Reding
0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2022-02-25 13:16 UTC (permalink / raw)
To: Miaoqian Lin
Cc: sboyd, jonathanh, linux-clk, linux-kernel, linux-tegra,
mturquette, pdeschrijver, pgaikwad
[-- Attachment #1: Type: text/plain, Size: 659 bytes --]
On Wed, Jan 12, 2022 at 10:45:01AM +0000, Miaoqian Lin wrote:
> The reference taken by 'of_find_device_by_node()' must be released when
> not needed anymore.
> Add the corresponding 'put_device()' in the error handling path.
>
> Fixes: 2db04f16b589 ("clk: tegra: Add EMC clock driver")
> Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
> ---
> Changes in v2:
> - add fixes tag.
> ---
> drivers/clk/tegra/clk-tegra124-emc.c | 1 +
> 1 file changed, 1 insertion(+)
Stephen, Mike,
I don't have anything else for clock tree this cycle, so perhaps best
for you guys to pick this up directly:
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-25 13:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 8:24 [PATCH] clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver Miaoqian Lin
2022-01-12 2:51 ` Stephen Boyd
2022-01-12 10:45 ` [PATCH v2] " Miaoqian Lin
2022-02-25 13:16 ` Thierry Reding
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.