[media] pwc: Also set alt setting to alt0 when no error occured
authorHans de Goede <hdegoede@redhat.com>
Tue, 16 Nov 2010 15:26:00 +0000 (12:26 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 29 Dec 2010 10:16:52 +0000 (08:16 -0200)
isoc_cleanup contains a check to not set the altsetting to alt0 when
the device was unplugged, but the check currently is buggy, and causes
the alt setting to only be set to 0 if an error occured while streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/pwc/pwc-if.c

index 6f8b682b9245ac143022c0d8e9403f165efb26fd..97319efc99482862dc0da0e4923c8cee1e3be018 100644 (file)
@@ -957,7 +957,7 @@ void pwc_isoc_cleanup(struct pwc_device *pdev)
        /* Stop camera, but only if we are sure the camera is still there (unplug
           is signalled by EPIPE)
         */
-       if (pdev->error_status && pdev->error_status != EPIPE) {
+       if (pdev->error_status != EPIPE) {
                PWC_DEBUG_OPEN("Setting alternate interface 0.\n");
                usb_set_interface(pdev->udev, 0, 0);
        }