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 <jaswinder.singh@linaro.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/f_uvc.c
index df74d03..7a8b9aa 100644
--- a/drivers/usb/gadget/f_uvc.c
+++ b/drivers/usb/gadget/f_uvc.c
@@ -651,7 +651,7 @@
if (ret)
kfree(uvc);
- return 0;
+ return ret;
error:
kfree(uvc);