Skip to content

Commit

Permalink
drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c
Browse files Browse the repository at this point in the history
[ Upstream commit 4ff5a9b ]

In qoriq_cpufreq_probe(), of_find_matching_node() will return a
node pointer with refcount incremented. We should use of_node_put()
when it is not used anymore.

Fixes: 157f527 ("cpufreq: qoriq: convert to a platform driver")
[ Viresh: Fixed Author's name in commit log ]
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
windhl authored and gregkh committed Jul 7, 2022
1 parent 68aa6f1 commit 8547315
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/cpufreq/qoriq-cpufreq.c
Expand Up @@ -275,6 +275,7 @@ static int qoriq_cpufreq_probe(struct platform_device *pdev)

np = of_find_matching_node(NULL, qoriq_cpufreq_blacklist);
if (np) {
of_node_put(np);
dev_info(&pdev->dev, "Disabling due to erratum A-008083");
return -ENODEV;
}
Expand Down

0 comments on commit 8547315

Please sign in to comment.