From patchwork Fri Jul 26 12:33:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 11060943 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3CDA1580 for ; Fri, 26 Jul 2019 12:34:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92CCF289B1 for ; Fri, 26 Jul 2019 12:34:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8703928A06; Fri, 26 Jul 2019 12:34:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D3AD8289E8 for ; Fri, 26 Jul 2019 12:34:53 +0000 (UTC) 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 A027B203C; Fri, 26 Jul 2019 14:34:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A027B203C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1564144491; bh=6El5UTc9HctkVCVGnHwucd4m/2qz15HTamdqiopes68=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=jd3Z43s6Qj2G9ko+cU7pIxFYape2V1qmyxhhmoejDy4auqH4qSEsgPGrSeAZeU50i bhmJaTF6Hz5Vf0jNxg4iwnWM9jYtkefxiRv/07uQ8pilBTIsmXW/z+9TlSKwF0srrb 1A0y+nZEWJMqml/YkhB859+JnBLe9G7GCfIF4RLQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 23C93F801A4; Fri, 26 Jul 2019 14:34:01 +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 E0151F80368; Fri, 26 Jul 2019 14:33:59 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AE81AF800E8 for ; Fri, 26 Jul 2019 14:33:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AE81AF800E8 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1hqzPb-0000wU-Ef; Fri, 26 Jul 2019 12:33:27 +0000 From: Colin King To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org Date: Fri, 26 Jul 2019 13:33:27 +0100 Message-Id: <20190726123327.10467-1-colin.king@canonical.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH][next] ASoC: codec2codec: fix missing return of error return code 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" X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King Currently in function snd_soc_dai_link_event_pre_pmu the error return code in variable err is being set but this is not actually being returned, the function just returns zero even when there are failures. Fix this by returning the error return code. Addresses-Coverity: ("Unused value") Fixes: 3dcfb397dad2 ("ASoC: codec2codec: deal with params when necessary") Signed-off-by: Colin Ian King --- sound/soc/soc-dapm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index be9bb05..2d183e2 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3776,7 +3776,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w, struct snd_pcm_hw_params *params = NULL; const struct snd_soc_pcm_stream *config = NULL; unsigned int fmt; - int ret; + int ret = 0; params = kzalloc(sizeof(*params), GFP_KERNEL); if (!params) @@ -3865,7 +3865,7 @@ snd_soc_dai_link_event_pre_pmu(struct snd_soc_dapm_widget *w, out: kfree(params); - return 0; + return ret; } static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,