V4L/DVB (13185): gspca: Don't resubmit error status URB's when suspending
authorHans de Goede <hdegoede@redhat.com>
Sat, 24 Oct 2009 18:02:14 +0000 (15:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:40:47 +0000 (18:40 -0200)
gspca: Don't resubmit error status URB's when suspending

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

index 3298e33c7822722f9894af88337832632e77a313..eb166048540d3822330470eafcd1fd0f507d25c9 100644 (file)
@@ -135,9 +135,10 @@ static void fill_frame(struct gspca_dev *gspca_dev,
                if (urb->status == -ESHUTDOWN)
                        return;         /* disconnection */
 #ifdef CONFIG_PM
-               if (!gspca_dev->frozen)
+               if (gspca_dev->frozen)
+                       return;
 #endif
-                       PDEBUG(D_ERR|D_PACK, "urb status: %d", urb->status);
+               PDEBUG(D_ERR|D_PACK, "urb status: %d", urb->status);
                goto resubmit;
        }
        pkt_scan = gspca_dev->sd_desc->pkt_scan;
@@ -218,9 +219,10 @@ static void bulk_irq(struct urb *urb)
                break;
        default:
 #ifdef CONFIG_PM
-               if (!gspca_dev->frozen)
+               if (gspca_dev->frozen)
+                       return;
 #endif
-                       PDEBUG(D_ERR|D_PACK, "urb status: %d", urb->status);
+               PDEBUG(D_ERR|D_PACK, "urb status: %d", urb->status);
                goto resubmit;
        }