[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200720041341.7506-1-vulab@iscas.ac.cn>
Date: Mon, 20 Jul 2020 04:13:41 +0000
From: Xu Wang <vulab@...as.ac.cn>
To: mchehab@...nel.org, sean@...s.org, vulab@...as.ac.cn,
oneukum@...e.com, yangyingliang@...wei.com, johan@...nel.org,
colin.king@...onical.com, linux-media@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] media: b2bc: remove needless check before usb_free_coherent()
usb_free_coherent() is safe with NULL addr and this check is
not required.
Signed-off-by: Xu Wang <vulab@...as.ac.cn>
---
drivers/media/usb/b2c2/flexcop-usb.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index 198ddfb8d2b1..c2cf1927c814 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -419,10 +419,7 @@ 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)
--
2.17.1
Powered by blists - more mailing lists