aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/core/pcm_native.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 263c01a70fdd..7bac1cbe38da 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1073,6 +1073,9 @@ int snd_pcm_suspend(struct snd_pcm_substream *substream)
1073 int err; 1073 int err;
1074 unsigned long flags; 1074 unsigned long flags;
1075 1075
1076 if (! substream)
1077 return 0;
1078
1076 snd_pcm_stream_lock_irqsave(substream, flags); 1079 snd_pcm_stream_lock_irqsave(substream, flags);
1077 err = snd_pcm_action(&snd_pcm_action_suspend, substream, 0); 1080 err = snd_pcm_action(&snd_pcm_action_suspend, substream, 0);
1078 snd_pcm_stream_unlock_irqrestore(substream, flags); 1081 snd_pcm_stream_unlock_irqrestore(substream, flags);
@@ -1091,6 +1094,9 @@ int snd_pcm_suspend_all(struct snd_pcm *pcm)
1091 struct snd_pcm_substream *substream; 1094 struct snd_pcm_substream *substream;
1092 int stream, err = 0; 1095 int stream, err = 0;
1093 1096
1097 if (! pcm)
1098 return 0;
1099
1094 for (stream = 0; stream < 2; stream++) { 1100 for (stream = 0; stream < 2; stream++) {
1095 for (substream = pcm->streams[stream].substream; 1101 for (substream = pcm->streams[stream].substream;
1096 substream; substream = substream->next) { 1102 substream; substream = substream->next) {