aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorTomoya MORINAGA <tomoya.rohm@gmail.com>2012-01-11 21:27:06 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-22 19:21:42 -0400
commit6ec7b0ee0b557e05d07d0f4530e6d04bc0ad5e81 (patch)
tree14402f99a966b2035e5915e6758a6235baf133fa /drivers/usb/gadget
parent21c7c5809c9d11ad3c1cdba9f0935b97ae4ccdd3 (diff)
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>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/pch_udc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/pch_udc.c b/drivers/usb/gadget/pch_udc.c
index 2b731f3efab..1cd620ed557 100644
--- a/drivers/usb/gadget/pch_udc.c
+++ b/drivers/usb/gadget/pch_udc.c
@@ -2918,8 +2918,10 @@ static int pch_udc_probe(struct pci_dev *pdev,
2918 } 2918 }
2919 pch_udc = dev; 2919 pch_udc = dev;
2920 /* initialize the hardware */ 2920 /* initialize the hardware */
2921 if (pch_udc_pcd_init(dev)) 2921 if (pch_udc_pcd_init(dev)) {
2922 retval = -ENODEV;
2922 goto finished; 2923 goto finished;
2924 }
2923 if (request_irq(pdev->irq, pch_udc_isr, IRQF_SHARED, KBUILD_MODNAME, 2925 if (request_irq(pdev->irq, pch_udc_isr, IRQF_SHARED, KBUILD_MODNAME,
2924 dev)) { 2926 dev)) {
2925 dev_err(&pdev->dev, "%s: request_irq(%d) fail\n", __func__, 2927 dev_err(&pdev->dev, "%s: request_irq(%d) fail\n", __func__,