platform/x86: asus-armoury: move existing tunings to asus-armoury module
Hello Luke D. Jones,
Commit f99eb098090e ("platform/x86: asus-armoury: move existing tunings to asus-armoury module") from Nov 2, 2025 (linux-next), leads to the following Smatch static checker warning:
drivers/platform/x86/asus-armoury.c:147 armoury_has_devstate()
error: uninitialized symbol 'retval'.
drivers/platform/x86/asus-armoury.c
141 static bool armoury_has_devstate(u32 dev_id)
142 {
143 u32 retval;
144 int status;
145
146 status = asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, dev_id, 0, &retval);
--> 147 pr_debug("%s called (0x%08x), retval: 0x%08x\n", __func__, dev_id, retval);
^^^^^^"retval" is uninitialized if asus_wmi_evaluate_method() returns negative.
148
149 return status == 0 && (retval & ASUS_WMI_DSTS_PRESENCE_BIT);
150 }regards,
dan carpenter
Thank you. As I have not been working on this driver and Denis is taking over I will CC him.
Quoted 28 lines · Dan Carpenter
Hello Luke D. Jones,
Commit
f99eb098090e("platform/x86: asus-armoury: move existing tunings to asus-armoury module") from Nov 2, 2025 (linux-next), leads to the following Smatch static checker warning:
drivers/platform/x86/asus-armoury.c:147armoury_has_devstate()
error: uninitialized symbol 'retval'.
drivers/platform/x86/asus-armoury.c
141 static boolarmoury_has_devstate(u32 dev_id)142 { 143 u32 retval; 144 int status; 145 146 status = asus_wmi_evaluate_method(ASUS_WMI_METHODID_DSTS, dev_id, 0, &retval); --> 147 pr_debug("%s called (0x%08x), retval: 0x%08x\n", __func__, dev_id, retval); ^^^^^^"retval" is uninitialized if
asus_wmi_evaluate_method()returns negative.148 149 return status == 0 && (retval & ASUS_WMI_DSTS_PRESENCE_BIT); 150 }regards,
dan carpenter