Skip to contentSkip to conversation

platform/x86/amd/hsmp: Ensure success even if hwmon registration fails

PATCH In review Suma Hegde 2 participants 3 messages Aug 4, 2025 – Aug 12, 2025

Subsystems (2)
lore
Share & tools
lore

Suma Hegde

author
#0 lore raw

PATCH 1/1 platform/x86/amd/hsmp: Ensure success even if hwmon registration fails

Even if hwmon registration fails, HSMP remains accessible through the device file, so the operation should return success.

---
Rebased on review-ilpo-next

 drivers/platform/x86/amd/hsmp/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/amd/hsmp/acpi.c +1 -1
index d974c2289f5a..19f0ca7958b6 100644
@@ -504,7 +504,7 @@ static int init_acpi(struct device *dev)
 
 	dev_set_drvdata(dev, &hsmp_pdev->sock[sock_ind]);
 
-	return ret;
+	return 0;
 }
 
 static const struct bin_attribute  hsmp_metric_tbl_attr = {
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Suma Hegde

Even if hwmon registration fails, HSMP remains accessible through the device file, so the operation should return success.

---
Rebased on review-ilpo-next

 drivers/platform/x86/amd/hsmp/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/amd/hsmp/acpi.c +0 -0
index d974c2289f5a..19f0ca7958b6 100644

drivers/platform/x86/amd/hsmp/acpi.c static int init_acpi(struct device *dev) · line 510

Quoted 8 lines
drivers/platform/x86/amd/hsmp/acpi.c +1 -1
@@ -504,7 +504,7 @@ static int init_acpi(struct device *dev)
 
 	dev_set_drvdata(dev, &hsmp_pdev->sock[sock_ind]);
 
-	return ret;
+	return 0;
 }
 
 static const struct bin_attribute  hsmp_metric_tbl_attr = {
Signature · 1 line
 i.
maintainer
#2 lore raw
In reply to Suma Hegde
Quoted 4 lines · Suma Hegde

Even if hwmon registration fails, HSMP remains accessible through the device file, so the operation should return success.

Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86/amd/hsmp: Ensure success even if hwmon registration fails

      commit: de5cec220e4d45d7129e76f7d985c7b01f10f8d9

--
i.