aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-07 07:49:37 -0400
committerFelipe Balbi <balbi@ti.com>2013-05-15 10:25:19 -0400
commitc3661951032d002d710c2187c5d9dbc8b4cabfa2 (patch)
tree5bc8180bdce24beaf55b8ce3d5ab9205ac6cd001 /drivers/usb
parentef89a1f3a84d127bdcda7e4dd54f763d2f88203f (diff)
usb: gadget: fusb300_udc: fix error return code in fusb300_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/fusb300_udc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c
index cec8871b77f9..b8632d40f8bf 100644
--- a/drivers/usb/gadget/fusb300_udc.c
+++ b/drivers/usb/gadget/fusb300_udc.c
@@ -1461,8 +1461,10 @@ static int __init fusb300_probe(struct platform_device *pdev)
1461 1461
1462 fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep, 1462 fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep,
1463 GFP_KERNEL); 1463 GFP_KERNEL);
1464 if (fusb300->ep0_req == NULL) 1464 if (fusb300->ep0_req == NULL) {
1465 ret = -ENOMEM;
1465 goto clean_up3; 1466 goto clean_up3;
1467 }
1466 1468
1467 init_controller(fusb300); 1469 init_controller(fusb300);
1468 ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget); 1470 ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget);