From: Wei Yongjun Date: Sat, 6 Apr 2013 04:39:49 +0000 (+0800) Subject: usb: gadget: f_obex: fix error return code in obex_bind() X-Git-Tag: v3.10-rc1~190^2~11^2~7 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=6ee3e8e63d77bb4ed686f0c92dc7aa1a8e13fefb;p=~emulex%2Finfiniband.git usb: gadget: f_obex: fix error return code in obex_bind() 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/f_obex.c b/drivers/usb/gadget/f_obex.c index 29a348a2a29..8aa2be5329b 100644 --- a/drivers/usb/gadget/f_obex.c +++ b/drivers/usb/gadget/f_obex.c @@ -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;