提交 f24c96ea 编写于 作者: L Lee, Chun-Yi 提交者: Matthew Garrett

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 <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NLee, Chun-Yi <jlee@suse.com>
Signed-off-by: NMatthew Garrett <matthew.garrett@nebula.com>
上级 6f62bc3e
...@@ -1222,6 +1222,9 @@ static acpi_status WMID_set_capabilities(void) ...@@ -1222,6 +1222,9 @@ static acpi_status WMID_set_capabilities(void)
devices = *((u32 *) obj->buffer.pointer); devices = *((u32 *) obj->buffer.pointer);
} else if (obj->type == ACPI_TYPE_INTEGER) { } else if (obj->type == ACPI_TYPE_INTEGER) {
devices = (u32) obj->integer.value; devices = (u32) obj->integer.value;
} else {
kfree(out.pointer);
return AE_ERROR;
} }
} else { } else {
kfree(out.pointer); kfree(out.pointer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册