Skip to contentSkip to conversation

platform/x86: dell-smbios-base: fix error return code in dell_smbios_init()

PATCH In review Luo Meng 2 participants 2 messages Nov 27, 2020 x86 platform drivers

lore
Share & tools
lore

Luo Meng

author
#0 lore raw

PATCH 1/1 platform/x86: dell-smbios-base: fix error return code in dell_smbios_init()

Fix to return a negative error code from the error handling case instead of 0 in function dell_smbios_init(), as done elsewhere in this function.

Fixes 25d47027e100 ("platform/x86: dell-smbios: Link all dell-smbios-* modules together")
---
 drivers/platform/x86/dell-smbios-base.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/dell-smbios-base.c +1 -0
index 2e2cd565926a..3a1dbf199441 100644
@@ -594,6 +594,7 @@ static int __init dell_smbios_init(void)
 	if (wmi && smm) {
 		pr_err("No SMBIOS backends available (wmi: %d, smm: %d)\n",
 			wmi, smm);
+		ret = -ENODEV;
 		goto fail_create_group;
 	}
 
Signature · 1 line
2.25.4
#1 lore raw

Hi,

Quoted 7 lines · Luo Meng

Fix to return a negative error code from the error handling case instead of 0 in function dell_smbios_init(), as done elsewhere in this function.

Fixes 25d47027e100 ("platform/x86: dell-smbios: Link all dell-smbios-* modules together")

A colleague of you already submitted the exact same fix:

https://patchwork.kernel.org/project/platform-driver-x86/patch/[email protected]/

I'm waiting on a review from Dell on that one before merging it.

Regards,

Hans

Quoted 17 lines
---
 drivers/platform/x86/dell-smbios-base.c | 1 +
 1 file changed, 1 insertion(+)
drivers/platform/x86/dell-smbios-base.c +1 -0
index 2e2cd565926a..3a1dbf199441 100644
@@ -594,6 +594,7 @@ static int __init dell_smbios_init(void)
 	if (wmi && smm) {
 		pr_err("No SMBIOS backends available (wmi: %d, smm: %d)\n",
 			wmi, smm);
+		ret = -ENODEV;
 		goto fail_create_group;
 	}