Skip to content

Commit 2e5a8e1

Browse files
ISCAS-Vulabtiwai
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 9ab0cb3 commit 2e5a8e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sound/usb/endpoint.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,8 @@ static void release_urbs(struct snd_usb_endpoint *ep, int force)
615615
for (i = 0; i < ep->nurbs; i++)
616616
release_urb_ctx(&ep->urb[i]);
617617

618-
if (ep->syncbuf)
619-
usb_free_coherent(ep->chip->dev, SYNC_URBS * 4,
620-
ep->syncbuf, ep->sync_dma);
618+
usb_free_coherent(ep->chip->dev, SYNC_URBS * 4,
619+
ep->syncbuf, ep->sync_dma);
621620

622621
ep->syncbuf = NULL;
623622
ep->nurbs = 0;

0 commit comments

Comments
 (0)