From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0B28C3B189 for ; Thu, 13 Feb 2020 15:39:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDBD820675 for ; Thu, 13 Feb 2020 15:39:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581608352; bh=h01NWZOOigUYj3y7BGnmqb1uz3HLgPVnrUQFyR0V3Nc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=gCbL3xkZJ5cwmDrly7QVW1YUpZD3X73xhASv0ArGjBSxHmmvStPuDZuXRCch5JZeG +B/WE6zkeRMSj00TmCJPv2G8yPOq9CuQAmkCNJhSsMQCoAM49r46oZVcAoCbrLMbGN XtaleiP0bkz7lbFj4lwUSzOrcl/5KZ7Uj6PfQGnY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728602AbgBMPjL (ORCPT ); Thu, 13 Feb 2020 10:39:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:58900 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387623AbgBMP3H (ORCPT ); Thu, 13 Feb 2020 10:29:07 -0500 Received: from localhost (unknown [104.132.1.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A04172168B; Thu, 13 Feb 2020 15:29:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607746; bh=h01NWZOOigUYj3y7BGnmqb1uz3HLgPVnrUQFyR0V3Nc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=joRpHBQepGwgQd5BTj3bYtfZAxoHh4tWRcM51QV/SNIUjuMdJQ+y5tXvvIHaqAFiF wN6xQG3fFj6PigBt8UwPQ5OKfMGuJKAjR29bbYidtV3QE21TZCyRVycTryWtXMfuAT Yr7/qc/5dk8flaRdjtU38BgScn5u3fYLECssQjDs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shengjiu Wang , John Stultz , Mark Brown Subject: [PATCH 5.5 104/120] ASoC: soc-generic-dmaengine-pcm: Fix error handling Date: Thu, 13 Feb 2020 07:21:40 -0800 Message-Id: <20200213151935.722992932@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151901.039700531@linuxfoundation.org> References: <20200213151901.039700531@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shengjiu Wang commit 130128098a4e5ce9a0dfbdf9a7e27a43579901fd upstream. 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 Link: https://lore.kernel.org/r/1579505286-32085-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/soc-generic-dmaengine-pcm.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) --- 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(struc 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(struc 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); }