Commit 4f3ebd6f authored by Xu Wang's avatar Xu Wang Committed by Kalle Valo

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: default avatarXu Wang <vulab@iscas.ac.cn>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200630070404.8207-1-vulab@iscas.ac.cn
parent 6648cfac
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment