From: Wei Yongjun Date: Wed, 15 Jan 2014 05:52:12 +0000 (-0300) Subject: upstream: [media] em28xx-audio: remove needless check before usb_free_coherent() X-Git-Tag: submit/tizen/20141121.110247~1506 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d7805071a50c0f2152cb18653061c284943ae20;p=platform%2Fkernel%2Flinux-3.10.git upstream: [media] em28xx-audio: remove needless check before usb_free_coherent() usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Wei Yongjun Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c index cec2d0d..120f20b 100644 --- a/drivers/media/usb/em28xx/em28xx-audio.c +++ b/drivers/media/usb/em28xx/em28xx-audio.c @@ -706,11 +706,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); }