Skip to content

Commit

Permalink
[media] em28xx-audio: remove needless check before usb_free_coherent()
Browse files Browse the repository at this point in the history
usb_free_coherent() is safe with NULL addr and this check is
not required.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Wei Yongjun authored and Mauro Carvalho Chehab committed Jan 15, 2014
1 parent 793708f commit ff0284c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/media/usb/em28xx/em28xx-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,9 @@ static void em28xx_audio_free_urb(struct em28xx *dev)
if (!urb)
continue;

if (dev->adev.transfer_buffer[i])
usb_free_coherent(dev->udev,
urb->transfer_buffer_length,
dev->adev.transfer_buffer[i],
urb->transfer_dma);
usb_free_coherent(dev->udev, urb->transfer_buffer_length,
dev->adev.transfer_buffer[i],
urb->transfer_dma);

usb_free_urb(urb);
}
Expand Down

0 comments on commit ff0284c

Please sign in to comment.