acer-wmi: avoid the warning of 'devices' may be used uninitialized
Subsystems (2)
PATCH 1/1 acer-wmi: avoid the warning of 'devices' may be used uninitialized
Fengguang Wu run kernel build test to platform-drivers-x86/linux-next git tree on x86_64 architecture and found a warning that was introduced by 727651bf738b6b917335025d09323d0962eda114 commit:
drivers/platform/x86/acer-wmi.c: In function ‘WMID_set_capabilities’:drivers/platform/x86/acer-wmi.c:1211: warning: ‘devices’ may be used uninitialized in this function
This patch fixes the above warning message.
Cc Carlos Corbacho <[email protected]>
Cc Matthew Garrett <[email protected]>
Cc Dmitry Torokhov <[email protected]>
Cc Corentin Chary <[email protected]>
Cc Fengguang Wu <[email protected]>
Signed-off-by Lee, Chun-Yi <[email protected]>
--- drivers/platform/x86/acer-wmi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/platform/x86/acer-wmi.c +3 -0
@@ -1222,6 +1222,9 @@ static acpi_status WMID_set_capabilities(void) devices = *((u32 *) obj->buffer.pointer); }else if (obj->type ==ACPI_TYPE_INTEGER ) { devices = (u32 ) obj->integer.value; + }else { +kfree (out.pointer); +return AE_ERROR ; } }else {kfree (out.pointer);
Signature · 1 line
1.6.4.2