aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s2255drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/s2255drv.c')
-rw-r--r--drivers/media/video/s2255drv.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c
index f08939c1f164..6be845ccc7d7 100644
--- a/drivers/media/video/s2255drv.c
+++ b/drivers/media/video/s2255drv.c
@@ -2281,8 +2281,10 @@ static void read_pipe_completion(struct urb *purb)
2281 return; 2281 return;
2282 } 2282 }
2283 status = purb->status; 2283 status = purb->status;
2284 if (status != 0) { 2284 /* if shutting down, do not resubmit, exit immediately */
2285 dprintk(2, "read_pipe_completion: err\n"); 2285 if (status == -ESHUTDOWN) {
2286 dprintk(2, "read_pipe_completion: err shutdown\n");
2287 pipe_info->err_count++;
2286 return; 2288 return;
2287 } 2289 }
2288 2290
@@ -2291,9 +2293,13 @@ static void read_pipe_completion(struct urb *purb)
2291 return; 2293 return;
2292 } 2294 }
2293 2295
2294 s2255_read_video_callback(dev, pipe_info); 2296 if (status == 0)
2297 s2255_read_video_callback(dev, pipe_info);
2298 else {
2299 pipe_info->err_count++;
2300 dprintk(1, "s2255drv: failed URB %d\n", status);
2301 }
2295 2302
2296 pipe_info->err_count = 0;
2297 pipe = usb_rcvbulkpipe(dev->udev, dev->read_endpoint); 2303 pipe = usb_rcvbulkpipe(dev->udev, dev->read_endpoint);
2298 /* reuse urb */ 2304 /* reuse urb */
2299 usb_fill_bulk_urb(pipe_info->stream_urb, dev->udev, 2305 usb_fill_bulk_urb(pipe_info->stream_urb, dev->udev,
@@ -2305,7 +2311,6 @@ static void read_pipe_completion(struct urb *purb)
2305 if (pipe_info->state != 0) { 2311 if (pipe_info->state != 0) {
2306 if (usb_submit_urb(pipe_info->stream_urb, GFP_KERNEL)) { 2312 if (usb_submit_urb(pipe_info->stream_urb, GFP_KERNEL)) {
2307 dev_err(&dev->udev->dev, "error submitting urb\n"); 2313 dev_err(&dev->udev->dev, "error submitting urb\n");
2308 usb_free_urb(pipe_info->stream_urb);
2309 } 2314 }
2310 } else { 2315 } else {
2311 dprintk(2, "read pipe complete state 0\n"); 2316 dprintk(2, "read pipe complete state 0\n");