summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2020-06-30 07:04:04 +0000
committerKalle Valo <kvalo@codeaurora.org>2020-07-15 19:46:38 +0300
commit4f3ebd6fb6806a948df9eb1dc7ea9bb76e2712ec (patch)
tree825811970ff16d5a9fce914e80533dc40c3556fc /drivers/net/wireless
parent6648cfac8e2a69e12aa314ffe1178353a474b957 (diff)
zd1211rw: 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@iscas.ac.cn> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20200630070404.8207-1-vulab@iscas.ac.cn
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/zydas/zd1211rw/zd_usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
index 8ff0374126e4..65b5985ad402 100644
--- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
@@ -600,9 +600,7 @@ void zd_usb_disable_int(struct zd_usb *usb)
dev_dbg_f(zd_usb_dev(usb), "urb %p killed\n", urb);
usb_free_urb(urb);
- if (buffer)
- usb_free_coherent(udev, USB_MAX_EP_INT_BUFFER,
- buffer, buffer_dma);
+ usb_free_coherent(udev, USB_MAX_EP_INT_BUFFER, buffer, buffer_dma);
}
static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer,