Skip to content

Commit

Permalink
[media] em28xx: remove double checks for urb->status == -ENOENT in ur…
Browse files Browse the repository at this point in the history
…b_data_copy functions

This check is already done in the URB handler
em28xx_irq_callback before calling these functions.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Frank Schaefer authored and Mauro Carvalho Chehab committed Dec 22, 2012
1 parent 337fe8d commit 1653cb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
5 changes: 1 addition & 4 deletions drivers/media/usb/em28xx/em28xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,8 @@ static inline int em28xx_dvb_isoc_copy(struct em28xx *dev, struct urb *urb)
if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED))
return 0;

if (urb->status < 0) {
if (urb->status < 0)
print_err_status(dev, -1, urb->status);
if (urb->status == -ENOENT)
return 0;
}

for (i = 0; i < urb->number_of_packets; i++) {
int status = urb->iso_frame_desc[i].status;
Expand Down
10 changes: 2 additions & 8 deletions drivers/media/usb/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,8 @@ static inline int em28xx_isoc_copy(struct em28xx *dev, struct urb *urb)
if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED))
return 0;

if (urb->status < 0) {
if (urb->status < 0)
print_err_status(dev, -1, urb->status);
if (urb->status == -ENOENT)
return 0;
}

buf = dev->usb_ctl.vid_buf;
if (buf != NULL)
Expand Down Expand Up @@ -525,11 +522,8 @@ static inline int em28xx_isoc_copy_vbi(struct em28xx *dev, struct urb *urb)
if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED))
return 0;

if (urb->status < 0) {
if (urb->status < 0)
print_err_status(dev, -1, urb->status);
if (urb->status == -ENOENT)
return 0;
}

buf = dev->usb_ctl.vid_buf;
if (buf != NULL)
Expand Down

0 comments on commit 1653cb0

Please sign in to comment.