]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: ice17xx: Deletion of unnecessary checks before the function call "snd_ac97_resume"
authorMarkus Elfring <elfring@users.sourceforge.net>
Mon, 17 Nov 2014 10:28:02 +0000 (11:28 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 17 Nov 2014 12:45:51 +0000 (13:45 +0100)
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>
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c

index 65251911cf6f34a0782eb210bfdee2aaa38989c9..b039b46152c62ff0f5ff20359e58e2c4bdb50080 100644 (file)
@@ -2878,8 +2878,7 @@ static int snd_ice1712_resume(struct device *dev)
        outw(ice->pm_saved_spdif_ctrl, ICEMT(ice, ROUTE_SPDOUT));
        outw(ice->pm_saved_route, ICEMT(ice, ROUTE_PSDOUT03));
 
-       if (ice->ac97)
-               snd_ac97_resume(ice->ac97);
+       snd_ac97_resume(ice->ac97);
 
        snd_power_change_state(card, SNDRV_CTL_POWER_D0);
        return 0;
index ea53167081b82ec4cc7c33b6d4667c582a0f7093..d73da157ea14adb4393b16c9aa126f1caf78e9f8 100644 (file)
@@ -2875,8 +2875,7 @@ static int snd_vt1724_resume(struct device *dev)
        outb(ice->pm_saved_spdif_cfg, ICEREG1724(ice, SPDIF_CFG));
        outl(ice->pm_saved_route, ICEMT1724(ice, ROUTE_PLAYBACK));
 
-       if (ice->ac97)
-               snd_ac97_resume(ice->ac97);
+       snd_ac97_resume(ice->ac97);
 
        snd_power_change_state(card, SNDRV_CTL_POWER_D0);
        return 0;