diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-11-16 10:32:09 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:16:53 -0500 |
commit | 622d9f5d302e99dc7a06cb442e9d9ff2bb0f59b5 (patch) | |
tree | ef46b8fc7ba6e2f1d055da8e2f095f3206b3c7fb /drivers/media/video/pwc | |
parent | c7d18867c82657a97f0bdb90ba1151b251b6a29b (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.c | 9 |
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) | |||
898 | /* link */ | 898 | /* link */ |
899 | for (i = 0; i < MAX_ISO_BUFS; i++) { | 899 | for (i = 0; i < MAX_ISO_BUFS; i++) { |
900 | ret = usb_submit_urb(pdev->sbuf[i].urb, GFP_KERNEL); | 900 | ret = usb_submit_urb(pdev->sbuf[i].urb, GFP_KERNEL); |
901 | if (ret) | 901 | if (ret) { |
902 | PWC_ERROR("isoc_init() submit_urb %d failed with error %d\n", i, ret); | 902 | PWC_ERROR("isoc_init() submit_urb %d failed with error %d\n", i, ret); |
903 | else | 903 | pdev->iso_init = 1; |
904 | PWC_DEBUG_MEMORY("URB 0x%p submitted.\n", pdev->sbuf[i].urb); | 904 | pwc_isoc_cleanup(pdev); |
905 | return ret; | ||
906 | } | ||
907 | PWC_DEBUG_MEMORY("URB 0x%p submitted.\n", pdev->sbuf[i].urb); | ||
905 | } | 908 | } |
906 | 909 | ||
907 | /* All is done... */ | 910 | /* All is done... */ |