* [PATCH] usb: endpoint : remove needless check before usb_free_coherent()
@ 2020-07-27 2:52 Xu Wang
2020-07-27 16:40 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Xu Wang @ 2020-07-27 2:52 UTC (permalink / raw)
To: perex, tiwai, alexander, e.burema, vulab, henryl, alsa-devel; +Cc: linux-kernel
usb_free_coherent() is safe with NULL addr and this check is
not required.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
sound/usb/endpoint.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 88760268fb55..3a2b2a309a71 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -615,9 +615,8 @@ static void release_urbs(struct snd_usb_endpoint *ep, int force)
for (i = 0; i < ep->nurbs; i++)
release_urb_ctx(&ep->urb[i]);
- if (ep->syncbuf)
- usb_free_coherent(ep->chip->dev, SYNC_URBS * 4,
- ep->syncbuf, ep->sync_dma);
+ usb_free_coherent(ep->chip->dev, SYNC_URBS * 4,
+ ep->syncbuf, ep->sync_dma);
ep->syncbuf = NULL;
ep->nurbs = 0;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: endpoint : remove needless check before usb_free_coherent()
2020-07-27 2:52 [PATCH] usb: endpoint : remove needless check before usb_free_coherent() Xu Wang
@ 2020-07-27 16:40 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-07-27 16:40 UTC (permalink / raw)
To: Xu Wang
Cc: perex, tiwai, alexander, e.burema, henryl, alsa-devel, linux-kernel
On Mon, 27 Jul 2020 04:52:08 +0200,
Xu Wang wrote:
>
> usb_free_coherent() is safe with NULL addr and this check is
> not required.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] usb: endpoint : remove needless check before usb_free_coherent()
@ 2020-07-27 16:40 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-07-27 16:40 UTC (permalink / raw)
To: Xu Wang; +Cc: e.burema, alsa-devel, linux-kernel, tiwai, henryl, alexander
On Mon, 27 Jul 2020 04:52:08 +0200,
Xu Wang wrote:
>
> usb_free_coherent() is safe with NULL addr and this check is
> not required.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-27 16:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 2:52 [PATCH] usb: endpoint : remove needless check before usb_free_coherent() Xu Wang
2020-07-27 16:40 ` Takashi Iwai
2020-07-27 16:40 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.