From: Greg Kroah-Hartman Date: Sun, 31 Jan 2016 19:14:40 +0000 (-0800) Subject: 3.14-stable patches X-Git-Tag: v4.1.17~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bac2c3e964f1033ea2bfcc218c42b0ffd95926e6;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: xhci-fix-placement-of-call-to-usb_disabled.patch --- diff --git a/queue-3.14/series b/queue-3.14/series new file mode 100644 index 00000000000..829ab9249f5 --- /dev/null +++ b/queue-3.14/series @@ -0,0 +1 @@ +xhci-fix-placement-of-call-to-usb_disabled.patch diff --git a/queue-3.14/xhci-fix-placement-of-call-to-usb_disabled.patch b/queue-3.14/xhci-fix-placement-of-call-to-usb_disabled.patch new file mode 100644 index 00000000000..5e9de6cf4d9 --- /dev/null +++ b/queue-3.14/xhci-fix-placement-of-call-to-usb_disabled.patch @@ -0,0 +1,42 @@ +From foo@baz Sun Jan 31 11:11:58 PST 2016 +Date: Sun, 31 Jan 2016 11:11:58 -0800 +To: Greg KH +From: Greg Kroah-Hartman +Subject: xhci: fix placement of call to usb_disabled() + +From: Greg Kroah-Hartman + +In the backport of 1eaf35e4dd592c59041bc1ed3248c46326da1f5f, the call to +usb_disabled() was too late, after we had already done some allocation. +Move that call to the top of the function instead, making the logic +match what is intended and is in the original patch. + +Reported-by: Luis Henriques +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/host/xhci.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -4866,6 +4866,9 @@ static int __init xhci_hcd_init(void) + { + int retval; + ++ if (usb_disabled()) ++ return -ENODEV; ++ + retval = xhci_register_pci(); + if (retval < 0) { + pr_debug("Problem registering PCI driver.\n"); +@@ -4894,9 +4897,6 @@ static int __init xhci_hcd_init(void) + /* xhci_run_regs has eight fields and embeds 128 xhci_intr_regs */ + BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8); + +- if (usb_disabled()) +- return -ENODEV; +- + return 0; + unreg_pci: + xhci_unregister_pci();