From: Wei Yongjun Date: Tue, 7 May 2013 11:49:37 +0000 (+0800) Subject: usb: gadget: fusb300_udc: fix error return code in fusb300_probe() X-Git-Tag: accepted/tizen/common/20141203.182822~2193^2~26^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3661951032d002d710c2187c5d9dbc8b4cabfa2;p=platform%2Fkernel%2Flinux-arm64.git 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c index cec8871..b8632d4 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) fusb300->ep0_req = fusb300_alloc_request(&fusb300->ep[0]->ep, GFP_KERNEL); - if (fusb300->ep0_req == NULL) + if (fusb300->ep0_req == NULL) { + ret = -ENOMEM; goto clean_up3; + } init_controller(fusb300); ret = usb_add_gadget_udc(&pdev->dev, &fusb300->gadget);