platform/x86/amd/hsmp: Ensure success even if hwmon registration fails
authorSuma Hegde <suma.hegde@amd.com>
Mon, 4 Aug 2025 10:15:51 +0000 (10:15 +0000)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 12 Aug 2025 12:05:42 +0000 (15:05 +0300)
Even if hwmon registration fails, HSMP remains accessible through the
device file, so the operation should return success.

Signed-off-by: Suma Hegde <suma.hegde@amd.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20250804101551.89866-1-suma.hegde@amd.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/amd/hsmp/acpi.c

index 54986a752f7d40cc6c7ceed396f2167ee34bca81..a94009203e0191dd34e785f20bff5d3887caed67 100644 (file)
@@ -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 = {