Commit ef89a1f3 authored by Wei Yongjun's avatar Wei Yongjun Committed by Felipe Balbi

usb: gadget: m66592-udc: fix error return code in m66592_probe()

Fix to return -ENOMEM in the request alloc error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent f3423d32
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment