Skip to content

Commit

Permalink
usb: gadget: m66592-udc: fix error return code in m66592_probe()
Browse files Browse the repository at this point in the history
Fix to return -ENOMEM in the request alloc 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>
  • Loading branch information
Wei Yongjun authored and Felipe Balbi committed May 15, 2013
1 parent f3423d3 commit ef89a1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/gadget/m66592-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,8 +1660,10 @@ static int __init m66592_probe(struct platform_device *pdev)
m66592->epaddr2ep[0] = &m66592->ep[0];

m66592->ep0_req = m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL);
if (m66592->ep0_req == NULL)
if (m66592->ep0_req == NULL) {
ret = -ENOMEM;
goto clean_up3;
}
m66592->ep0_req->complete = nop_completion;

init_controller(m66592);
Expand Down

0 comments on commit ef89a1f

Please sign in to comment.