Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: trident: Deletion of a check before snd_util_memhdr_free()

The snd_util_memhdr_free() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Markus Elfring and committed by
Takashi Iwai
5c34fdf4 057a4a55

+1 -2
+1 -2
sound/pci/trident/trident_main.c
··· 3702 3702 free_irq(trident->irq, trident); 3703 3703 if (trident->tlb.buffer.area) { 3704 3704 outl(0, TRID_REG(trident, NX_TLBC)); 3705 - if (trident->tlb.memhdr) 3706 - snd_util_memhdr_free(trident->tlb.memhdr); 3705 + snd_util_memhdr_free(trident->tlb.memhdr); 3707 3706 if (trident->tlb.silent_page.area) 3708 3707 snd_dma_free_pages(&trident->tlb.silent_page); 3709 3708 vfree(trident->tlb.shadow_entries);