Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933730Ab3CLWkW (ORCPT ); Tue, 12 Mar 2013 18:40:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60400 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756088Ab3CLWdb (ORCPT ); Tue, 12 Mar 2013 18:33:31 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Lee, Chun-Yi" , Carlos Corbacho , Matthew Garrett , Dmitry Torokhov , Corentin Chary , Fengguang Wu , Matthew Garrett , Paul Bolle Subject: [ 082/100] acer-wmi: avoid the warning of devices may be used uninitialized Date: Tue, 12 Mar 2013 15:32:07 -0700 Message-Id: <20130312223131.758571232@linuxfoundation.org> X-Mailer: git-send-email 1.8.1.rc1.5.g7e0651a In-Reply-To: <20130312223122.884099393@linuxfoundation.org> References: <20130312223122.884099393@linuxfoundation.org> User-Agent: quilt/0.60-2.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1754 Lines: 51 3.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Lee, Chun-Yi" commit f24c96eae58aeea4c36fb064cf3ee9734933f8fc upstream. 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. Signed-off-by: Lee, Chun-Yi Cc: Carlos Corbacho Cc: Matthew Garrett Cc: Dmitry Torokhov Cc: Corentin Chary Cc: Fengguang Wu Signed-off-by: Matthew Garrett Signed-off-by: Paul Bolle Signed-off-by: Greg Kroah-Hartman --- drivers/platform/x86/acer-wmi.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1204,6 +1204,9 @@ static acpi_status WMID_set_capabilities 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/