From 9fe8084f456563e562215ef6f340bba68fd8e7aa Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 11 Mar 2013 14:26:45 -0700 Subject: [PATCH] 3.8-stable patches added patches: acer-wmi-avoid-the-warning-of-devices-may-be-used-uninitialized.patch usbnet-smsc95xx-fix-suspend-failure.patch --- ...of-devices-may-be-used-uninitialized.patch | 45 ++++++++++++++ queue-3.8/series | 2 + .../usbnet-smsc95xx-fix-suspend-failure.patch | 58 +++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 queue-3.8/acer-wmi-avoid-the-warning-of-devices-may-be-used-uninitialized.patch create mode 100644 queue-3.8/usbnet-smsc95xx-fix-suspend-failure.patch diff --git a/queue-3.8/acer-wmi-avoid-the-warning-of-devices-may-be-used-uninitialized.patch b/queue-3.8/acer-wmi-avoid-the-warning-of-devices-may-be-used-uninitialized.patch new file mode 100644 index 00000000000..53281c6508f --- /dev/null +++ b/queue-3.8/acer-wmi-avoid-the-warning-of-devices-may-be-used-uninitialized.patch @@ -0,0 +1,45 @@ +From f24c96eae58aeea4c36fb064cf3ee9734933f8fc Mon Sep 17 00:00:00 2001 +From: "Lee, Chun-Yi" +Date: Thu, 3 Jan 2013 10:37:45 +0800 +Subject: acer-wmi: avoid the warning of 'devices' may be used uninitialized + +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); diff --git a/queue-3.8/series b/queue-3.8/series index 94a29bc3095..d4d44a0719e 100644 --- a/queue-3.8/series +++ b/queue-3.8/series @@ -79,3 +79,5 @@ x86-kvm-fix-pvclock-vsyscall-fixmap.patch mfd-rtsx-optimize-card-detect-flow.patch mfd-rtsx-fix-issue-that-booting-os-with-sd-card-inserted.patch crypto-user-fix-info-leaks-in-report-api.patch +acer-wmi-avoid-the-warning-of-devices-may-be-used-uninitialized.patch +usbnet-smsc95xx-fix-suspend-failure.patch diff --git a/queue-3.8/usbnet-smsc95xx-fix-suspend-failure.patch b/queue-3.8/usbnet-smsc95xx-fix-suspend-failure.patch new file mode 100644 index 00000000000..f687ff16e91 --- /dev/null +++ b/queue-3.8/usbnet-smsc95xx-fix-suspend-failure.patch @@ -0,0 +1,58 @@ +From 7643721471117d5f62ca36f328d3dc8d84af4402 Mon Sep 17 00:00:00 2001 +From: Ming Lei +Date: Fri, 22 Feb 2013 03:05:03 +0000 +Subject: usbnet: smsc95xx: fix suspend failure + +From: Ming Lei + +commit 7643721471117d5f62ca36f328d3dc8d84af4402 upstream. + +The three below functions: + + smsc95xx_enter_suspend0() + smsc95xx_enter_suspend1() + smsc95xx_enter_suspend2() + +return > 0 in case of success, so they will cause smsc95xx_suspend() +to return > 0 and cause suspend failure. + +The bug is introduced in commit 3b9f7d(smsc95xx: fix error handling +in suspend failure case). + +Signed-off-by: Ming Lei +Cc: Steve Glendinning +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/usb/smsc95xx.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/net/usb/smsc95xx.c ++++ b/drivers/net/usb/smsc95xx.c +@@ -1340,6 +1340,8 @@ static int smsc95xx_enter_suspend0(struc + ret = smsc95xx_read_reg_nopm(dev, PM_CTRL, &val); + if (ret < 0) + netdev_warn(dev->net, "Error reading PM_CTRL\n"); ++ else ++ ret = 0; + + return ret; + } +@@ -1392,6 +1394,8 @@ static int smsc95xx_enter_suspend1(struc + ret = smsc95xx_write_reg_nopm(dev, PM_CTRL, val); + if (ret < 0) + netdev_warn(dev->net, "Error writing PM_CTRL\n"); ++ else ++ ret = 0; + + return ret; + } +@@ -1413,6 +1417,8 @@ static int smsc95xx_enter_suspend2(struc + ret = smsc95xx_write_reg_nopm(dev, PM_CTRL, val); + if (ret < 0) + netdev_warn(dev->net, "Error writing PM_CTRL\n"); ++ else ++ ret = 0; + + return ret; + } -- 2.47.3