]> www.infradead.org Git - linux.git/commit
cpufreq: qcom-nvmem: fix memory leaks in probe error paths
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Thu, 23 May 2024 21:24:59 +0000 (23:24 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 28 May 2024 06:09:06 +0000 (11:39 +0530)
commitd01c84b97f19f1137211e90b0a910289a560019e
treee17d5ae32e7b93579e5abf14a90f6c2db92a8c54
parent074cffb5020ddcaa5fafcc55655e5da6ebe8c831
cpufreq: qcom-nvmem: fix memory leaks in probe error paths

The code refactoring added new error paths between the np device node
allocation and the call to of_node_put(), which leads to memory leaks if
any of those errors occur.

Add the missing of_node_put() in the error paths that require it.

Cc: stable@vger.kernel.org
Fixes: 57f2f8b4aa0c ("cpufreq: qcom: Refactor the driver to make it easier to extend")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/qcom-cpufreq-nvmem.c