clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
Subsystems (3)
PATCH 1/1 clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
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.
--- drivers/clk/tegra/clk-tegra124-emc.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/tegra/clk-tegra124-emc.c +1 -0
@@ -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 ; }
Signature · 1 line
2.17.1
Stephen Boyd
maintainerQuoting Miaoqian Lin (2022-01-07 00:24:36)
Quoted 5 lines
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 <[email protected]>
Please send the mail To: somebody
Also, please add a Fixes: tag.
PATCH v2 1/1 clk: tegra: tegra124-emc: Fix missing put_device() call in emc_ensure_emc_driver
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.
---
Changes in v2:
- add fixes tag.
--- drivers/clk/tegra/clk-tegra124-emc.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/tegra/clk-tegra124-emc.c +1 -0
@@ -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 ; }
Signature · 1 line
2.17.1
Quoted 4 lines · Miaoqian Lin
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.
Quoted 8 lines
Fixes 2db04f16b589 ("clk: tegra: Add EMC clock driver")Signed-off-by Miaoqian Lin <[email protected]>---
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: