Skip to content

Commit aa57b93

Browse files
elfringtiwai
authored andcommitted
ALSA: aoa: Delete an unnecessary check before the function call "snd_pcm_suspend_all"
The snd_pcm_suspend_all() 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 b172e0a commit aa57b93

File tree

1 file changed

+2
-4
lines changed
  • sound/aoa/soundbus/i2sbus

1 file changed

+2
-4
lines changed

sound/aoa/soundbus/i2sbus/core.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,8 @@ static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state)
381381

382382
list_for_each_entry(i2sdev, &control->list, item) {
383383
/* Notify Alsa */
384-
if (i2sdev->sound.pcm) {
385-
/* Suspend PCM streams */
386-
snd_pcm_suspend_all(i2sdev->sound.pcm);
387-
}
384+
/* Suspend PCM streams */
385+
snd_pcm_suspend_all(i2sdev->sound.pcm);
388386

389387
/* Notify codecs */
390388
list_for_each_entry(cii, &i2sdev->sound.codec_list, list) {

0 commit comments

Comments
 (0)