Skip to content

Commit b9e4d1e

Browse files
committed
platform/x86: dell-wmi-sysman: Make sysman_init() return -ENODEV of the interfaces are not found
jira LE-3064 Rebuild_History Non-Buildable kernel-4.18.0-553.53.1.el8_10 commit-author Hans de Goede <hdegoede@redhat.com> commit 9b95665 Empty-Commit: Cherry-Pick Conflicts during history rebuild. Will be included in final tarball splat. Ref for failed cherry-pick at: ciq/ciq_backports/kernel-4.18.0-553.53.1.el8_10/9b95665a.failed When either the attributes or the password interface is not found, then unregister the 2 wmi drivers again and return -ENODEV from sysman_init(). Fixes: e8a60aa ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi <Divya_Bharathi@dell.com> Cc: Mario Limonciello <mario.limonciello@dell.com> Reported-by: Alexander Naumann <alexandernaumann@gmx.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20210321115901.35072-7-hdegoede@redhat.com (cherry picked from commit 9b95665) Signed-off-by: Jonathan Maple <jmaple@ciq.com> # Conflicts: # drivers/platform/x86/dell-wmi-sysman/sysman.c
1 parent 21f74bf commit b9e4d1e

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
platform/x86: dell-wmi-sysman: Make sysman_init() return -ENODEV of the interfaces are not found
2+
3+
jira LE-3064
4+
Rebuild_History Non-Buildable kernel-4.18.0-553.53.1.el8_10
5+
commit-author Hans de Goede <hdegoede@redhat.com>
6+
commit 9b95665a83ec555f441f5681daa58f75828d0255
7+
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
8+
Will be included in final tarball splat. Ref for failed cherry-pick at:
9+
ciq/ciq_backports/kernel-4.18.0-553.53.1.el8_10/9b95665a.failed
10+
11+
When either the attributes or the password interface is not found, then
12+
unregister the 2 wmi drivers again and return -ENODEV from sysman_init().
13+
14+
Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems")
15+
Cc: Divya Bharathi <Divya_Bharathi@dell.com>
16+
Cc: Mario Limonciello <mario.limonciello@dell.com>
17+
Reported-by: Alexander Naumann <alexandernaumann@gmx.de>
18+
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
19+
Link: https://lore.kernel.org/r/20210321115901.35072-7-hdegoede@redhat.com
20+
(cherry picked from commit 9b95665a83ec555f441f5681daa58f75828d0255)
21+
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
22+
23+
# Conflicts:
24+
# drivers/platform/x86/dell-wmi-sysman/sysman.c
25+
diff --cc drivers/platform/x86/dell-wmi-sysman/sysman.c
26+
index 641f87850439,5dd9b29d939c..000000000000
27+
--- a/drivers/platform/x86/dell-wmi-sysman/sysman.c
28+
+++ b/drivers/platform/x86/dell-wmi-sysman/sysman.c
29+
@@@ -504,22 -506,24 +504,36 @@@ static int __init sysman_init(void
30+
}
31+
32+
ret = init_bios_attr_set_interface();
33+
++<<<<<<< HEAD:drivers/platform/x86/dell-wmi-sysman/sysman.c
34+
+ if (ret || !wmi_priv.bios_attr_wdev) {
35+
+ pr_debug("failed to initialize set interface\n");
36+
+ goto fail_set_interface;
37+
+ }
38+
+
39+
+ ret = init_bios_attr_pass_interface();
40+
+ if (ret || !wmi_priv.password_attr_wdev) {
41+
+ pr_debug("failed to initialize pass interface\n");
42+
+ goto fail_pass_interface;
43+
++=======
44+
+ if (ret)
45+
+ return ret;
46+
+
47+
+ ret = init_bios_attr_pass_interface();
48+
+ if (ret)
49+
+ goto err_exit_bios_attr_set_interface;
50+
+
51+
+ if (!wmi_priv.bios_attr_wdev || !wmi_priv.password_attr_wdev) {
52+
+ pr_debug("failed to find set or pass interface\n");
53+
+ ret = -ENODEV;
54+
+ goto err_exit_bios_attr_pass_interface;
55+
++>>>>>>> 9b95665a83ec (platform/x86: dell-wmi-sysman: Make sysman_init() return -ENODEV of the interfaces are not found):drivers/platform/x86/dell/dell-wmi-sysman/sysman.c
56+
}
57+
58+
- ret = class_register(&firmware_attributes_class);
59+
+ ret = fw_attributes_class_get(&fw_attr_class);
60+
if (ret)
61+
- goto err_exit_bios_attr_pass_interface;
62+
+ goto fail_class;
63+
64+
- wmi_priv.class_dev = device_create(&firmware_attributes_class, NULL, MKDEV(0, 0),
65+
+ wmi_priv.class_dev = device_create(fw_attr_class, NULL, MKDEV(0, 0),
66+
NULL, "%s", DRIVER_NAME);
67+
if (IS_ERR(wmi_priv.class_dev)) {
68+
ret = PTR_ERR(wmi_priv.class_dev);
69+
* Unmerged path drivers/platform/x86/dell-wmi-sysman/sysman.c

0 commit comments

Comments
 (0)