From: Greg Kroah-Hartman Date: Thu, 14 Feb 2019 08:18:25 +0000 (+0100) Subject: 3.18-stable patches X-Git-Tag: v4.9.157~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=019e9e99ed4eaeb52da909d0478ce088dc172cfd;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: usb-host-ehci-msm-fix-handling-platform_get_irq-result.patch --- diff --git a/queue-3.18/series b/queue-3.18/series index e2e36371843..fb05674c8db 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -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 index 00000000000..e2704d3f550 --- /dev/null +++ b/queue-3.18/usb-host-ehci-msm-fix-handling-platform_get_irq-result.patch @@ -0,0 +1,42 @@ +From 0c43e9d835b003d862a5f76e3affcc1f973fb3c0 Mon Sep 17 00:00:00 2001 +From: Andrzej Hajda +Date: Mon, 21 Sep 2015 15:33:39 +0200 +Subject: usb: host: ehci-msm: fix handling platform_get_irq result + +From: Andrzej Hajda + +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 +Acked-by: Alan Stern +Signed-off-by: Greg Kroah-Hartman + +--- + 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) {