From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 3/6] ASoC: dwc: remove unneeded check for snd_pcm_running() Date: Thu, 9 Nov 2017 02:12:29 +0000 Message-ID: <87mv3wp5rs.wl%kuninori.morimoto.gx@renesas.com> References: <87r2t8p5tz.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 206D72676A7 for ; Thu, 9 Nov 2017 03:12:35 +0100 (CET) In-Reply-To: <87r2t8p5tz.wl%kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown , Takashi Iwai Cc: Linux-ALSA , Simon List-Id: alsa-devel@alsa-project.org From: Kuninori Morimoto snd_pcm_running() itself is checking parameter now. Let's remove duplicate check Signed-off-by: Kuninori Morimoto --- 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