From patchwork Thu Jul 16 05:07:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "S.J. Wang" X-Patchwork-Id: 11666655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3676F60D for ; Thu, 16 Jul 2020 05:11:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30DCF207BC for ; Thu, 16 Jul 2020 05:11:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="uyL7+17f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30DCF207BC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 30A551607; Thu, 16 Jul 2020 07:11:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 30A551607 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1594876313; bh=miTwL5vlMq/k8gjQkLs2QIyu8cBEcLy1dvOm+z3scUg=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=uyL7+17fNx2ttQmcHrhVFHkALweyejLqB7b9Fz+6NHAjpXFAyrc+ibUaytEhhTY85 ykfl6YANnwvYa1OwbCvXSdf2+hYuKMogqc/ULA/APUpl6nhBBb+4xKsx42hlU1nGu1 dOhB1S6W0F97+K0D7utMOGdftuN356P1AIEJ2/uc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BE3EEF8014E; Thu, 16 Jul 2020 07:11:06 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 09C71F801EC; Thu, 16 Jul 2020 07:11:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B6096F8014E for ; Thu, 16 Jul 2020 07:10:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6096F8014E Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 4886A1A0522; Thu, 16 Jul 2020 07:10:58 +0200 (CEST) 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 DE3FA1A04F1; Thu, 16 Jul 2020 07:10:53 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 3E86E402BF; Thu, 16 Jul 2020 13:10:48 +0800 (SGT) From: Shengjiu Wang To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, kuninori.morimoto.gx@renesas.com, ranjani.sridharan@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: soc-component: Add missed return for calling soc_component_ret Date: Thu, 16 Jul 2020 13:07:08 +0800 Message-Id: <1594876028-1845-1-git-send-email-shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add missed return for calling soc_component_ret, otherwise the return value is wrong. Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()") Signed-off-by: Shengjiu Wang Acked-by: Kuninori Morimoto --- changes in v2 - add missed return in snd_soc_pcm_component_sync_stop and - snd_soc_pcm_component_new sound/soc/soc-component.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index af9909c5492f..9565a0dd7cb6 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -647,7 +647,7 @@ int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream) ret = component->driver->sync_stop(component, substream); if (ret < 0) - soc_component_ret(component, ret); + return soc_component_ret(component, ret); } } @@ -705,7 +705,7 @@ int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream, /* FIXME. it returns 1st mmap now */ for_each_rtd_components(rtd, i, component) if (component->driver->mmap) - soc_component_ret( + return soc_component_ret( component, component->driver->mmap(component, substream, vma)); @@ -723,7 +723,7 @@ int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd) if (component->driver->pcm_construct) { ret = component->driver->pcm_construct(component, rtd); if (ret < 0) - soc_component_ret(component, ret); + return soc_component_ret(component, ret); } }