[alsa-devel] [PATCH 4/6] ASoC: omap-hdmi-audio: remove unneeded check for snd_pcm_running()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Nov 9 03:12:46 CET 2017


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

snd_pcm_running() itself is checking parameter now.
Let's remove duplicate check

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/omap/omap-hdmi-audio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/omap/omap-hdmi-audio.c b/sound/soc/omap/omap-hdmi-audio.c
index 8eeac7c..ab2f8d7 100644
--- a/sound/soc/omap/omap-hdmi-audio.c
+++ b/sound/soc/omap/omap-hdmi-audio.c
@@ -58,8 +58,7 @@ static void hdmi_dai_abort(struct device *dev)
 	struct hdmi_audio_data *ad = dev_get_drvdata(dev);
 
 	mutex_lock(&ad->current_stream_lock);
-	if (ad->current_stream && ad->current_stream->runtime &&
-	    snd_pcm_running(ad->current_stream)) {
+	if (snd_pcm_running(ad->current_stream)) {
 		dev_err(dev, "HDMI display disabled, aborting playback\n");
 		snd_pcm_stream_lock_irq(ad->current_stream);
 		snd_pcm_stop(ad->current_stream, SNDRV_PCM_STATE_DISCONNECTED);
-- 
1.9.1



More information about the Alsa-devel mailing list