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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241107032626.16682-3-lihuisong@huawei.com>
Date: Thu, 7 Nov 2024 11:26:26 +0800
From: Huisong Li <lihuisong@...wei.com>
To: <linux-pm@...r.kernel.org>, <rafael@...nel.org>
CC: <linux-kernel@...r.kernel.org>, <liuyonglong@...wei.com>,
	<zhanjie9@...ilicon.com>, <lihuisong@...wei.com>
Subject: [PATCH v1 2/2] hwmon: (acpi_power_meter) Fix fail to load module on platform without _PMD method

As ACPI spec said, _PMD method is optional. The acpi_power_meter
shouldn't fail to load when the platform hasn't _PMD method.

Signed-off-by: Huisong Li <lihuisong@...wei.com>
---
 drivers/hwmon/acpi_power_meter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 6c8a9c863528..2f1c9d97ad21 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -680,8 +680,9 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
 {
 	int res = 0;
 
+	/* _PMD method is optional. */
 	res = read_domain_devices(resource);
-	if (res)
+	if (res != -ENODEV)
 		return res;
 
 	if (resource->caps.flags & POWER_METER_CAN_MEASURE) {
-- 
2.22.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ