diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-11-14 18:01:52 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-11-14 18:02:00 +0100 |
commit | b12b2259bc4c1e0b34d4adb5c0e41b23761a5c08 (patch) | |
tree | 2ba710e251093b204af6e53860c9d3e8223e1d03 /sound/core | |
parent | 509526706e68e4fb47519f02f78b48c818869d4e (diff) | |
parent | 976a68f06b2ea49e2ab67a5f84919a8b105db8be (diff) | |
download | linux-b12b2259bc4c1e0b34d4adb5c0e41b23761a5c08.tar.bz2 |
Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/pcm_lib.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index d80041ea4e01..2236b5e0c1f2 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -1782,11 +1782,14 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime; unsigned long flags; - if (PCM_RUNTIME_CHECK(substream)) + if (snd_BUG_ON(!substream)) return; - runtime = substream->runtime; snd_pcm_stream_lock_irqsave(substream, flags); + if (PCM_RUNTIME_CHECK(substream)) + goto _unlock; + runtime = substream->runtime; + if (!snd_pcm_running(substream) || snd_pcm_update_hw_ptr0(substream, 1) < 0) goto _end; @@ -1797,6 +1800,7 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream) #endif _end: kill_fasync(&runtime->fasync, SIGIO, POLL_IN); + _unlock: snd_pcm_stream_unlock_irqrestore(substream, flags); } EXPORT_SYMBOL(snd_pcm_period_elapsed); |