usb: gadget: f_obex: fix error return code in obex_bind()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sat, 6 Apr 2013 04:39:49 +0000 (12:39 +0800)
committerFelipe Balbi <balbi@ti.com>
Tue, 23 Apr 2013 11:09:57 +0000 (14:09 +0300)
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>
drivers/usb/gadget/f_obex.c

index 29a348a2a294fafe37676d260257f90c6332c7b1..8aa2be5329bcff2a3619c4aa0044c944afa5566f 100644 (file)
@@ -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;