From: Hans de Goede Date: Tue, 16 Nov 2010 15:32:09 +0000 (-0300) Subject: [media] pwc: failure to submit an urb is a fatal error X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=622d9f5d302e99dc7a06cb442e9d9ff2bb0f59b5;p=openwrt%2Fstaging%2Fblogic.git [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 Signed-off-by: Mauro Carvalho Chehab --- 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... */