From: Xu Wang Date: Mon, 27 Jul 2020 02:52:08 +0000 (+0000) Subject: ALSA: usb-audio: endpoint : remove needless check before usb_free_coherent() X-Git-Tag: v5.10.7~1331^2~83^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2e5a8e1527a8cea26c973ee4aa1840ceb674101e;p=platform%2Fkernel%2Flinux-rpi.git 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 Link: https://lore.kernel.org/r/20200727025208.8739-1-vulab@iscas.ac.cn Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index 9bea7d3..c41ce98 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;