Bug report: https://bugzilla.novell.com/show_bug.cgi?id=387876

If probe fails the UVC driver may still be bound to a streaming
interface.  This interface must be released with
usb_driver_release_interface() otherwise the interface will continue to
be bound causing suspend operations to fail.

Tested using this little hack:
> +++ uvc_video.c
> @@ -870,6 +870,8 @@ int uvc_video_init(st
>        if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_DEF)) < 0 &&
>             (ret = uvc_get_video_ctrl(video, probe, 1, GET_CUR)) < 0)
>                 return ret;
> +
> +       return -EIO;
>  

Signed-off-by: Brandon Philips <[EMAIL PROTECTED]>

---
 uvc_driver.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: uvc/uvc_driver.c
===================================================================
--- uvc.orig/uvc_driver.c
+++ uvc/uvc_driver.c
@@ -865,6 +865,8 @@ static int uvc_parse_standard_control(st
 
                        if (uvc_parse_streaming(dev, streaming) < 0) {
                                usb_put_intf(intf);
+                               usb_driver_release_interface(&uvc_driver.driver,
+                                       intf);
                                kfree(streaming->format);
                                kfree(streaming->header.bmaControls);
                                kfree(streaming);
@@ -1524,6 +1526,8 @@ void uvc_delete(struct kref *kref)
                struct uvc_streaming *streaming;
                streaming = list_entry(p, struct uvc_streaming, list);
                usb_put_intf(streaming->intf);
+               usb_driver_release_interface(&uvc_driver.driver,
+                       streaming->intf);
                kfree(streaming->format);
                kfree(streaming->header.bmaControls);
                kfree(streaming);
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to