Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Qinglang Miao and committed by
Mauro Carvalho Chehab
cf580e11 d725d20e

+3 -4
+3 -4
drivers/media/usb/b2c2/flexcop-usb.c
··· 419 419 usb_free_urb(fc_usb->iso_urb[i]); 420 420 } 421 421 422 - if (fc_usb->iso_buffer != NULL) 423 - usb_free_coherent(fc_usb->udev, 424 - fc_usb->buffer_size, fc_usb->iso_buffer, 425 - fc_usb->dma_addr); 422 + usb_free_coherent(fc_usb->udev, fc_usb->buffer_size, 423 + fc_usb->iso_buffer, fc_usb->dma_addr); 424 + 426 425 } 427 426 428 427 static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)