* [PATCH] net: zydas: remove needless check before usb_free_coherent()
@ 2020-06-30 7:04 Chen Ni
2020-07-15 16:46 ` [PATCH] zd1211rw: " Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2020-06-30 7:04 UTC (permalink / raw)
To: dsd, kune, kvalo, davem, linux-wireless, netdev; +Cc: linux-kernel, Xu Wang
From: Xu Wang <vulab@iscas.ac.cn>
usb_free_coherent() is safe with NULL addr and this check is
not required.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
drivers/net/wireless/zydas/zd1211rw/zd_usb.c | 4 +---
1 file changed, 1 insertion(+), 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,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] zd1211rw: remove needless check before usb_free_coherent()
2020-06-30 7:04 [PATCH] net: zydas: remove needless check before usb_free_coherent() Chen Ni
@ 2020-07-15 16:46 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-07-15 16:46 UTC (permalink / raw)
To: Chen Ni; +Cc: dsd, kune, davem, linux-wireless, netdev, linux-kernel, Xu Wang
Chen Ni <vulab@iscas.ac.cn> wrote:
> From: Xu Wang <vulab@iscas.ac.cn>
>
> usb_free_coherent() is safe with NULL addr and this check is
> not required.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Patch applied to wireless-drivers-next.git, thanks.
4f3ebd6fb680 zd1211rw: remove needless check before usb_free_coherent()
--
https://patchwork.kernel.org/patch/11633321/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-15 16:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-30 7:04 [PATCH] net: zydas: remove needless check before usb_free_coherent() Chen Ni
2020-07-15 16:46 ` [PATCH] zd1211rw: " Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).