diff options
author | Xu Wang | 2020-07-27 02:52:08 +0000 |
---|---|---|
committer | Takashi Iwai | 2020-07-27 18:39:59 +0200 |
commit | 2e5a8e1527a8cea26c973ee4aa1840ceb674101e (patch) | |
tree | 8a1074d905c157943cd0c2a178245a8743991a5b /sound | |
parent | 9ab0cb309e7950a1649bffade985e7ccc7aaf675 (diff) |
ALSA: usb-audio: endpoint : 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>
Link: https://lore.kernel.org/r/20200727025208.8739-1-vulab@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/endpoint.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 9bea7d3f99f8..c41ce983a4b1 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; |