[media] em28xx-audio: remove needless check before usb_free_coherent()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 15 Jan 2014 05:52:12 +0000 (02:52 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 15 Jan 2014 11:12:03 +0000 (09:12 -0200)
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>
drivers/media/usb/em28xx/em28xx-audio.c

index e57616ecd2cbba993004c587840ea2ce10e1c5a8..05e9bd11a3ff016128e6c9dd05e1086cd454ce0e 100644 (file)
@@ -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);
        }