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

ALSA: echoaudio: Deletion of a check before release_and_free_resource()

The release_and_free_resource() 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
057a4a55 87164cc5

+1 -2
+1 -2
sound/pci/echoaudio/echoaudio.c
··· 1875 1875 if (chip->dsp_registers) 1876 1876 iounmap(chip->dsp_registers); 1877 1877 1878 - if (chip->iores) 1879 - release_and_free_resource(chip->iores); 1878 + release_and_free_resource(chip->iores); 1880 1879 1881 1880 1882 1881 pci_disable_device(chip->pci);