summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-14 08:15:13 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-09-27 11:25:11 +0200
commitcf580e11fb6c94bc995dddc55489c65d0499cdd9 (patch)
treef951486d550f67c253a8d3471c635336a06ccf17 /drivers/media
parentd725d20e81c2adc2d3c956ad8aa420b7705532a8 (diff)
downloadlinux-cf580e11fb6c94bc995dddc55489c65d0499cdd9.tar.bz2
media: flexcop-usb: remove needless check before usb_free_coherent()
usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/b2c2/flexcop-usb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index e4da32771379..e731243267e4 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -419,10 +419,9 @@ static void flexcop_usb_transfer_exit(struct flexcop_usb *fc_usb)
usb_free_urb(fc_usb->iso_urb[i]);
}
- if (fc_usb->iso_buffer != NULL)
- usb_free_coherent(fc_usb->udev,
- fc_usb->buffer_size, fc_usb->iso_buffer,
- fc_usb->dma_addr);
+ usb_free_coherent(fc_usb->udev, fc_usb->buffer_size,
+ fc_usb->iso_buffer, fc_usb->dma_addr);
+
}
static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)