Skip to content

Commit

Permalink
usb: gadget: f_obex: fix error return code in obex_bind()
Browse files Browse the repository at this point in the history
Fix to return a negative error code from the error handling
case instead of 0, as returned 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 Apr 23, 2013
1 parent 9b192de commit 6ee3e8e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/gadget/f_obex.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ static int obex_bind(struct usb_configuration *c, struct usb_function *f)

/* allocate instance-specific endpoints */

status = -ENODEV;
ep = usb_ep_autoconfig(cdev->gadget, &obex_fs_ep_in_desc);
if (!ep)
goto fail;
Expand Down

0 comments on commit 6ee3e8e

Please sign in to comment.