Skip to content

Commit

Permalink
acer-wmi: avoid the warning of 'devices' may be used uninitialized
Browse files Browse the repository at this point in the history
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: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
  • Loading branch information
Lee, Chun-Yi authored and Matthew Garrett committed Feb 27, 2013
1 parent 6f62bc3 commit f24c96e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f24c96e

Please sign in to comment.