V4L/DVB (13185): gspca: Don't resubmit error status URB's when suspending

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>
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 3298e33..eb16604 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -135,9 +135,10 @@
 		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 @@
 		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;
 	}