diff options
| author | Ingo Molnar <mingo@kernel.org> | 2019-11-25 09:08:29 +0100 | 
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2019-11-25 09:08:29 +0100 | 
| commit | c494cd6469ab0f4bdd663d1a2d396b0ec2f42103 (patch) | |
| tree | 5830ff0a0266c5500188d1ee9df8f2cbe0871b35 /sound/core/pcm_lib.c | |
| parent | 8cacac6ecd6d289d4ab52590784636a5b1043c66 (diff) | |
| parent | c4b75479741c9c3a4f0abff5baa5013d27640ac1 (diff) | |
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/core/pcm_lib.c')
| -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);  | 
