[alsa-devel] [PATCH 5/6] ASoC: xtfpga-i2s: remove unneeded check for snd_pcm_running()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Thu Nov 9 03:14:31 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/xtensa/xtfpga-i2s.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/xtensa/xtfpga-i2s.c b/sound/soc/xtensa/xtfpga-i2s.c
index bc3151c..bf0c7b7 100644
--- a/sound/soc/xtensa/xtfpga-i2s.c
+++ b/sound/soc/xtensa/xtfpga-i2s.c
@@ -163,7 +163,7 @@ static bool xtfpga_pcm_push_tx(struct xtfpga_i2s *i2s)
rcu_read_lock();
tx_substream = rcu_dereference(i2s->tx_substream);
- tx_active = tx_substream && snd_pcm_running(tx_substream);
+ tx_active = snd_pcm_running(tx_substream);
if (tx_active) {
unsigned tx_ptr = ACCESS_ONCE(i2s->tx_ptr);
unsigned new_tx_ptr = i2s->tx_fn(i2s, tx_substream->runtime,
@@ -254,7 +254,7 @@ static irqreturn_t xtfpga_i2s_threaded_irq_handler(int irq, void *dev_id)
rcu_read_lock();
tx_substream = rcu_dereference(i2s->tx_substream);
- if (tx_substream && snd_pcm_running(tx_substream)) {
+ if (snd_pcm_running(tx_substream)) {
snd_pcm_period_elapsed(tx_substream);
if (int_status & XTFPGA_I2S_INT_UNDERRUN)
dev_dbg_ratelimited(i2s->dev, "%s: underrun\n",
--
1.9.1
More information about the Alsa-devel
mailing list