summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorLee, Chun-Yi <joeyli.kernel@gmail.com>2013-01-03 10:37:45 +0800
committerMatthew Garrett <matthew.garrett@nebula.com>2013-02-27 08:30:41 -0500
commitf24c96eae58aeea4c36fb064cf3ee9734933f8fc (patch)
tree1d1e8d0b88cd3a4b747ad02bb61d795d92e46ae4 /drivers/platform/x86
parent6f62bc3e8d2410b538bde9677552270055f8595a (diff)
downloadop-kernel-dev-f24c96eae58aeea4c36fb064cf3ee9734933f8fc.zip
op-kernel-dev-f24c96eae58aeea4c36fb064cf3ee9734933f8fc.tar.gz
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: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/acer-wmi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 563dc3f..c9076bd 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -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);
OpenPOWER on IntegriCloud