]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Feb 2019 08:18:25 +0000 (09:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Feb 2019 08:18:25 +0000 (09:18 +0100)
added patches:
usb-host-ehci-msm-fix-handling-platform_get_irq-result.patch

queue-3.18/series
queue-3.18/usb-host-ehci-msm-fix-handling-platform_get_irq-result.patch [new file with mode: 0644]

index e2e363718439eca4da069f9bd9be9808a7c31ea1..fb05674c8db501707229f289496797b882262c0b 100644 (file)
@@ -87,3 +87,4 @@ libceph-avoid-keepalive_pending-races-in-ceph_con_keepalive.patch
 xfrm-refine-validation-of-template-and-selector-families.patch
 batman-adv-avoid-warn-on-net_device-without-parent-in-netns.patch
 batman-adv-force-mac-header-to-start-of-data-on-xmit.patch
+usb-host-ehci-msm-fix-handling-platform_get_irq-result.patch
diff --git a/queue-3.18/usb-host-ehci-msm-fix-handling-platform_get_irq-result.patch b/queue-3.18/usb-host-ehci-msm-fix-handling-platform_get_irq-result.patch
new file mode 100644 (file)
index 0000000..e2704d3
--- /dev/null
@@ -0,0 +1,42 @@
+From 0c43e9d835b003d862a5f76e3affcc1f973fb3c0 Mon Sep 17 00:00:00 2001
+From: Andrzej Hajda <a.hajda@samsung.com>
+Date: Mon, 21 Sep 2015 15:33:39 +0200
+Subject: usb: host: ehci-msm: fix handling platform_get_irq result
+
+From: Andrzej Hajda <a.hajda@samsung.com>
+
+commit 0c43e9d835b003d862a5f76e3affcc1f973fb3c0 upstream.
+
+The function can return negative values.
+
+The problem has been detected using proposed semantic patch
+scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].
+
+[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576
+
+Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
+Acked-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/ehci-msm.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/host/ehci-msm.c
++++ b/drivers/usb/host/ehci-msm.c
+@@ -80,12 +80,12 @@ static int ehci_msm_probe(struct platfor
+               return  -ENOMEM;
+       }
+-      hcd->irq = platform_get_irq(pdev, 0);
+-      if (hcd->irq < 0) {
++      ret = platform_get_irq(pdev, 0);
++      if (ret < 0) {
+               dev_err(&pdev->dev, "Unable to get IRQ resource\n");
+-              ret = hcd->irq;
+               goto put_hcd;
+       }
++      hcd->irq = ret;
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       if (!res) {