summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/pch_udc.c
diff options
context:
space:
mode:
authorTomoya MORINAGA <tomoya.rohm@gmail.com>2012-01-12 11:27:06 +0900
committerFelipe Balbi <balbi@ti.com>2012-01-24 11:34:24 +0200
commitc802672cd36cd063bfd54d54c8c34825ab5b2357 (patch)
tree862c8c34512f314eb8fc57388298484c087b729a /drivers/usb/gadget/pch_udc.c
parentc50a3bff0edb0acd49d8033a12ea4668e09a31ad (diff)
downloadop-kernel-dev-c802672cd36cd063bfd54d54c8c34825ab5b2357.zip
op-kernel-dev-c802672cd36cd063bfd54d54c8c34825ab5b2357.tar.gz
usb: gadget: pch_udc: Fix wrong return value
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>
Diffstat (limited to 'drivers/usb/gadget/pch_udc.c')
-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 6a44c92..96606b6 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__,
OpenPOWER on IntegriCloud