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

ALSA: ice17xx: Deletion of unnecessary checks before the function call "snd_ac97_resume"

The snd_ac97_resume() 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
ae1b2265 f0acd28c

+2 -4
+1 -2
sound/pci/ice1712/ice1712.c
··· 2878 2878 outw(ice->pm_saved_spdif_ctrl, ICEMT(ice, ROUTE_SPDOUT)); 2879 2879 outw(ice->pm_saved_route, ICEMT(ice, ROUTE_PSDOUT03)); 2880 2880 2881 - if (ice->ac97) 2882 - snd_ac97_resume(ice->ac97); 2881 + snd_ac97_resume(ice->ac97); 2883 2882 2884 2883 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 2885 2884 return 0;
+1 -2
sound/pci/ice1712/ice1724.c
··· 2875 2875 outb(ice->pm_saved_spdif_cfg, ICEREG1724(ice, SPDIF_CFG)); 2876 2876 outl(ice->pm_saved_route, ICEMT1724(ice, ROUTE_PLAYBACK)); 2877 2877 2878 - if (ice->ac97) 2879 - snd_ac97_resume(ice->ac97); 2878 + snd_ac97_resume(ice->ac97); 2880 2879 2881 2880 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 2882 2881 return 0;