]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/gadget/f_uvc.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback
[karo-tx-linux.git] / drivers / usb / gadget / f_uvc.c
index be446b7e7eaa263d2543552c74ee4e1210591111..7a8b9aa4aea5468e8ce92b0d2f8184d409509721 100644 (file)
@@ -262,8 +262,10 @@ uvc_function_set_alt(struct usb_function *f, unsigned interface, unsigned alt)
                if (uvc->state != UVC_STATE_CONNECTED)
                        return 0;
 
-               if (uvc->video.ep)
-                       usb_ep_enable(uvc->video.ep, &uvc_streaming_ep);
+               if (uvc->video.ep) {
+                       uvc->video.ep->desc = &uvc_streaming_ep;
+                       usb_ep_enable(uvc->video.ep);
+               }
 
                memset(&v4l2_event, 0, sizeof(v4l2_event));
                v4l2_event.type = UVC_EVENT_STREAMON;
@@ -649,7 +651,7 @@ uvc_bind_config(struct usb_configuration *c,
        if (ret)
                kfree(uvc);
 
-       return 0;
+       return ret;
 
 error:
        kfree(uvc);