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

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

authored by

Xu Wang and committed by
Kalle Valo
4f3ebd6f 6648cfac

+1 -3
+1 -3
drivers/net/wireless/zydas/zd1211rw/zd_usb.c
··· 600 600 dev_dbg_f(zd_usb_dev(usb), "urb %p killed\n", urb); 601 601 usb_free_urb(urb); 602 602 603 - if (buffer) 604 - usb_free_coherent(udev, USB_MAX_EP_INT_BUFFER, 605 - buffer, buffer_dma); 603 + usb_free_coherent(udev, USB_MAX_EP_INT_BUFFER, buffer, buffer_dma); 606 604 } 607 605 608 606 static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer,