lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211210043024.80884-1-yang.lee@linux.alibaba.com>
Date:   Fri, 10 Dec 2021 12:30:24 +0800
From:   Yang Li <yang.lee@...ux.alibaba.com>
To:     rafael@...nel.org, agross@...nel.org, bjorn.andersson@...aro.org,
        daniel.lezcano@...aro.org
Cc:     linux-arm-msm@...r.kernel.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH -next 2/2] cpuidle: add put_device() after of_find_device_by_node()

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@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ