]> asedeno.scripts.mit.edu Git - linux.git/commit
cpufreq: maple: fix possible object reference leak
authorWen Yang <wen.yang99@zte.com.cn>
Mon, 1 Apr 2019 01:37:51 +0000 (09:37 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 8 Apr 2019 10:07:06 +0000 (15:37 +0530)
commitddb07fba1c645791ead16d1eee0639a033fb8cf9
tree8bc2f2f0a9e98437118ad3729896897e138ce7f0
parent7c468966f05ac9c17bb5948275283d34e6fe0660
cpufreq: maple: fix possible object reference leak

The call to of_cpu_device_node_get returns a node pointer with refcount
incremented thus it must be explicitly decremented after the last
usage.

Detected by coccinelle with the following warnings:
./drivers/cpufreq/maple-cpufreq.c:213:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 177, but without a corresponding object release within this function.

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/maple-cpufreq.c