diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-05-07 07:49:08 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-05-15 10:25:11 -0400 |
commit | ef89a1f3a84d127bdcda7e4dd54f763d2f88203f (patch) | |
tree | d77d15aba38e5c2b628d3ec488243fc9f444c125 /drivers/usb/gadget/m66592-udc.c | |
parent | f3423d3258cd9939c06df75a582b16d52fc2249f (diff) |
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/m66592-udc.c')
-rw-r--r-- | drivers/usb/gadget/m66592-udc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index 866ef0999247..51cfe72da5bb 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c | |||
@@ -1660,8 +1660,10 @@ static int __init m66592_probe(struct platform_device *pdev) | |||
1660 | m66592->epaddr2ep[0] = &m66592->ep[0]; | 1660 | m66592->epaddr2ep[0] = &m66592->ep[0]; |
1661 | 1661 | ||
1662 | m66592->ep0_req = m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL); | 1662 | m66592->ep0_req = m66592_alloc_request(&m66592->ep[0].ep, GFP_KERNEL); |
1663 | if (m66592->ep0_req == NULL) | 1663 | if (m66592->ep0_req == NULL) { |
1664 | ret = -ENOMEM; | ||
1664 | goto clean_up3; | 1665 | goto clean_up3; |
1666 | } | ||
1665 | m66592->ep0_req->complete = nop_completion; | 1667 | m66592->ep0_req->complete = nop_completion; |
1666 | 1668 | ||
1667 | init_controller(m66592); | 1669 | init_controller(m66592); |