[PATCH 5/6] ASoC: xtfpga-i2s: remove unneeded check for snd_pcm_running()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

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

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
 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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux