[alsa-devel] [PATCH 3/6] ASoC: dwc: remove unneeded check for snd_pcm_running()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Nov 9 03:12:29 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/dwc/dwc-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/dwc/dwc-pcm.c b/sound/soc/dwc/dwc-pcm.c
index 2cc9632..1bab46c 100644
--- a/sound/soc/dwc/dwc-pcm.c
+++ b/sound/soc/dwc/dwc-pcm.c
@@ -102,7 +102,7 @@ static void dw_pcm_transfer(struct dw_i2s_dev *dev, bool push)
 		substream = rcu_dereference(dev->tx_substream);
 	else
 		substream = rcu_dereference(dev->rx_substream);
-	active = substream && snd_pcm_running(substream);
+	active = snd_pcm_running(substream);
 	if (active) {
 		unsigned int ptr;
 		unsigned int new_ptr;
-- 
1.9.1



More information about the Alsa-devel mailing list