From: Jassi Brar Date: Fri, 24 Jun 2011 18:47:26 +0000 (+0530) Subject: USB: Gadget: Webcam: Return correct result of bind X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=28f75f4db1e5ea1366375b2a6c40d66659e0e7ec;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git USB: Gadget: Webcam: Return correct result of bind The config bind was reported success even if usb_add_function failed. Fix the return value. Signed-off-by: Jassi Brar Acked-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c index df74d0311910..7a8b9aa4aea5 100644 --- a/drivers/usb/gadget/f_uvc.c +++ b/drivers/usb/gadget/f_uvc.c @@ -651,7 +651,7 @@ uvc_bind_config(struct usb_configuration *c, if (ret) kfree(uvc); - return 0; + return ret; error: kfree(uvc);