summaryrefslogtreecommitdiff
path: root/drivers/media/video/pwc
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2010-11-16 12:32:09 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 08:16:53 -0200
commit622d9f5d302e99dc7a06cb442e9d9ff2bb0f59b5 (patch)
treeef46b8fc7ba6e2f1d055da8e2f095f3206b3c7fb /drivers/media/video/pwc
parentc7d18867c82657a97f0bdb90ba1151b251b6a29b (diff)
[media] pwc: failure to submit an urb is a fatal error
Failure to submit an urb is a fatal error, make isoc_init return an error when this happens rather then only log it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc')
-rw-r--r--drivers/media/video/pwc/pwc-if.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 97319efc9948..bd1519a4ecb4 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -898,10 +898,13 @@ int pwc_isoc_init(struct pwc_device *pdev)
/* link */
for (i = 0; i < MAX_ISO_BUFS; i++) {
ret = usb_submit_urb(pdev->sbuf[i].urb, GFP_KERNEL);
- if (ret)
+ if (ret) {
PWC_ERROR("isoc_init() submit_urb %d failed with error %d\n", i, ret);
- else
- PWC_DEBUG_MEMORY("URB 0x%p submitted.\n", pdev->sbuf[i].urb);
+ pdev->iso_init = 1;
+ pwc_isoc_cleanup(pdev);
+ return ret;
+ }
+ PWC_DEBUG_MEMORY("URB 0x%p submitted.\n", pdev->sbuf[i].urb);
}
/* All is done... */