* [PATCH -next 2/2] cpuidle: add put_device() after of_find_device_by_node()
@ 2021-12-10 4:30 Yang Li
0 siblings, 0 replies; only message in thread
From: Yang Li @ 2021-12-10 4:30 UTC (permalink / raw)
To: rafael, agross, bjorn.andersson, daniel.lezcano
Cc: linux-arm-msm, linux-pm, linux-kernel, Yang Li, Abaci Robot
This was found by coccicheck:
./drivers/cpuidle/cpuidle-qcom-spm.c:129:1-7: ERROR: missing put_device;
call of_find_device_by_node on line 103, but without a corresponding
object release within this function.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
drivers/cpuidle/cpuidle-qcom-spm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/cpuidle/cpuidle-qcom-spm.c b/drivers/cpuidle/cpuidle-qcom-spm.c
index 01e77913a414..3952ea600122 100644
--- a/drivers/cpuidle/cpuidle-qcom-spm.c
+++ b/drivers/cpuidle/cpuidle-qcom-spm.c
@@ -111,6 +111,7 @@ static int spm_cpuidle_register(struct device *cpuidle_dev, int cpu)
return -ENOMEM;
data->spm = dev_get_drvdata(&pdev->dev);
+ put_device(&pdev->dev);
if (!data->spm)
return -EINVAL;
--
2.20.1.7.g153144c
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-12-10 4:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 4:30 [PATCH -next 2/2] cpuidle: add put_device() after of_find_device_by_node() Yang Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).