Skip to content

Commit 1fac168

Browse files
elfringtiwai
authored andcommitted
ALSA: oxygen: Delete an unnecessary check before the function call "snd_pcm_suspend"
The snd_pcm_suspend() 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 <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent a827977 commit 1fac168

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/pci/oxygen/oxygen_lib.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,7 @@ static int oxygen_pci_suspend(struct device *dev)
736736
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
737737

738738
for (i = 0; i < PCM_COUNT; ++i)
739-
if (chip->streams[i])
740-
snd_pcm_suspend(chip->streams[i]);
739+
snd_pcm_suspend(chip->streams[i]);
741740

742741
if (chip->model.suspend)
743742
chip->model.suspend(chip);

0 commit comments

Comments
 (0)