Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2285578ybl; Sun, 19 Jan 2020 23:33:39 -0800 (PST) X-Google-Smtp-Source: APXvYqy/OdQsa9k3/QSXDKn7uYS5AfOTUI4/gtlLGf7J/ImOV2nCSjw1oWmqcz4xWAkK0cZR7+4u X-Received: by 2002:a05:6830:1385:: with SMTP id d5mr15559830otq.61.1579505619031; Sun, 19 Jan 2020 23:33:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579505619; cv=none; d=google.com; s=arc-20160816; b=grFJ4tpwqpWLy7AVX9oGgPTVKR9cL5zdhXPYZYx5sVtVEvWuc33vLi/Pm2On30jWW8 k9QQ51m8d27tzpDip6s+FD0YkgWM16RFNv/VGoaQLMZ7XeYvl21k/zMVJCMP+V4RpdU1 JAiPmP7XKcjhMvJ1FEYTt8CDR/lLo0PRYnM0ouXwhw8Z0A4H+VJ/+XvOaIkrR8KaWajR nsQlUv1lCbedEG27GrDsW7EuVeRCHHscOH8zjwUwpC9+t8LKxjut8ITaWTgLXwVI480l uavAomTukH+e5fZ1AmVxm68pQANhuu2nGPtK449ujqRNvYOkdcQcuw95L/5V5aHb8D2Z nJOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from; bh=/tlDELZUbeeOqqFDviK5bhx4kxer1SBb2+7TGXS7lss=; b=gNH9BbSoXXHiWik2ZUF35lcybsmMr+j1KS9sTy9RDO8Q3D6DkIVRkzw7luX6ljV5Qv Kq1CgCgX+qn/Bb5s/9fvMVS+2aM/swSxEySrYRqWILBHb2kXXVFSx2/hDDy1V0XMMKlv UM9G+tQH+PEdM8l4EcRQT1FALAJavTepZaJJm7fstLHhLX5e038WiXqskijMVVSowYyJ U0v84I5BdSwrozylp38LE6kbWARI9s9YSUlQOS6PUGRR4nJy+dXtwo8pco4Pn6CYQ7iy J9x5NCofjLCzLwIQXGXn0LPF9OPvd+cNDHomGvA15VhSBWljimGhE8IUUbZfE+bY9sSR fx4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e26si8006884otp.140.2020.01.19.23.33.27; Sun, 19 Jan 2020 23:33:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbgATHcd (ORCPT + 99 others); Mon, 20 Jan 2020 02:32:33 -0500 Received: from inva020.nxp.com ([92.121.34.13]:56870 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726089AbgATHcc (ORCPT ); Mon, 20 Jan 2020 02:32:32 -0500 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EA2081A058C; Mon, 20 Jan 2020 08:32:30 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 77D441A02E4; Mon, 20 Jan 2020 08:32:27 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id EF3E8402C4; Mon, 20 Jan 2020 15:32:22 +0800 (SGT) From: Shengjiu Wang To: lars@metafoo.de, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org Subject: [PATCH] ASoC: soc-generic-dmaengine-pcm: Fix error handling Date: Mon, 20 Jan 2020 15:28:06 +0800 Message-Id: <1579505286-32085-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove the return value checking, that is to align with the code before adding snd_dmaengine_pcm_refine_runtime_hwparams function. Otherwise it causes a regression on the HiKey board: [ 17.721424] hi6210_i2s f7118000.i2s: ASoC: can't open component f7118000.i2s: -6 Fixes: e957204e732b ("ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams") Signed-off-by: Shengjiu Wang Reported-by: John Stultz --- sound/soc/soc-generic-dmaengine-pcm.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index a428ff393ea2..2b5f3b1b062b 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -117,7 +117,6 @@ dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component, struct dma_chan *chan = pcm->chan[substream->stream]; struct snd_dmaengine_dai_dma_data *dma_data; struct snd_pcm_hardware hw; - int ret; if (pcm->config && pcm->config->pcm_hardware) return snd_soc_set_runtime_hwparams(substream, @@ -138,12 +137,15 @@ dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component, if (pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) hw.info |= SNDRV_PCM_INFO_BATCH; - ret = snd_dmaengine_pcm_refine_runtime_hwparams(substream, - dma_data, - &hw, - chan); - if (ret) - return ret; + /** + * FIXME: Remove the return value check to align with the code + * before adding snd_dmaengine_pcm_refine_runtime_hwparams + * function. + */ + snd_dmaengine_pcm_refine_runtime_hwparams(substream, + dma_data, + &hw, + chan); return snd_soc_set_runtime_hwparams(substream, &hw); } -- 2.21.0