aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.16/0050-usb-gadget-pch_udc-Fix-wrong-return-value.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.16/0050-usb-gadget-pch_udc-Fix-wrong-return-value.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.16/0050-usb-gadget-pch_udc-Fix-wrong-return-value.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.16/0050-usb-gadget-pch_udc-Fix-wrong-return-value.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.16/0050-usb-gadget-pch_udc-Fix-wrong-return-value.patch
new file mode 100644
index 00000000..7f865084
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.16/0050-usb-gadget-pch_udc-Fix-wrong-return-value.patch
@@ -0,0 +1,42 @@
+From f081bd91f871a44ac4bf6035aaacfd666024b30a Mon Sep 17 00:00:00 2001
+From: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Date: Thu, 12 Jan 2012 11:27:06 +0900
+Subject: [PATCH 50/68] usb: gadget: pch_udc: Fix wrong return value
+
+commit c802672cd36cd063bfd54d54c8c34825ab5b2357 upstream.
+
+ISSUE:
+If the return value of pch_udc_pcd_init() is False, the return value of
+this function is unsettled.
+Since pch_udc_pcd_init() always returns 0, there is not actually the issue.
+
+CAUSE:
+If pch_udc_pcd_init() is True, the variable, retval, is not set for an
+appropriate value.
+
+Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
+Signed-off-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/gadget/pch_udc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
+index 521e995..a9a7d8a 100644
+--- a/drivers/usb/gadget/pch_udc.c
++++ b/drivers/usb/gadget/pch_udc.c
+@@ -2915,8 +2915,10 @@ static int pch_udc_probe(struct pci_dev *pdev,
+ }
+ pch_udc = dev;
+ /* initialize the hardware */
+- if (pch_udc_pcd_init(dev))
++ if (pch_udc_pcd_init(dev)) {
++ retval = -ENODEV;
+ goto finished;
++ }
+ if (request_irq(pdev->irq, pch_udc_isr, IRQF_SHARED, KBUILD_MODNAME,
+ dev)) {
+ dev_err(&pdev->dev, "%s: request_irq(%d) fail\n", __func__,
+--
+1.7.10
+