From patchwork Wed Mar 1 11:38:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13155871 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D593C64ED6 for ; Wed, 1 Mar 2023 11:40:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rh6BrmIilaNWGV2CGNSjKirHoXFevHLxyfxGh+U7Ua4=; b=26bMmOExjW6bdX YR4UEG7MtHC3OyzIWFejME/hhW7/6EKXBzfm53P0sbvxbPki5eECwlDLtgoOdb4xFCc0CewjT4zDv ckWWtv4iTlV8YxPVX7XEabKZVJMUXhRYJo7cZZqIAZMliVjsXZOZqLYatTrQqFkO8bKzCOP/DKzRb wEYRe+BdnN3oSnLmLXbulF7Rqid5CPc3b3HQL6HetxAR2dfLeBaPMEW8MIS/M7pD6v8VTwVCjXztf R4et/ea9qmAnp6ka6umpl3umGSz0uKeWuIM6Ocy0V8yFrP7CfIMzittx3Ink30wH0Mhu/GxF0ER0k B+Syvx9g/sYYgooqkRbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pXKna-00FxLA-7R; Wed, 01 Mar 2023 11:39:06 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pXKnF-00FxBR-Ur for linux-arm-kernel@lists.infradead.org; Wed, 01 Mar 2023 11:38:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1677670725; x=1709206725; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XHLvCT8Nt8YmIKi30XtbTBcw6kinTTqUBJYbD4/6SFc=; b=m3tA4J5+U/ucJ4nW56DxDrJLN35QaYKzvFHoZsKRg9ELGgq6MpfAT0eX BA+/OJ9IzEOhZTdtSSGZZonBIFV9IpBurX66rbOHUBHblIlrdtN+1V9jJ asm2rOiILS6jaK+XRjI46TEk7YXgR81dnDvDsoVtKoautY07Ekiy50l1U a52OCBsUoVQUI8lm7OdY13gvQWycFzCYz8kmgPUCIqLl/+gaW4TkP00jZ lSH+uGWC4iK6yomjHTtTblDADlsfbviOnZoTpvbW5veET3z4BzU+qtWZ5 TZ/b0iGipPgkmF+5PQ5UNPkask28oWL7s/ufO207a+iV4qC2opd+lnIvB Q==; X-IronPort-AV: E=Sophos;i="5.98,224,1673938800"; d="scan'208";a="202995026" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 01 Mar 2023 04:38:45 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Mar 2023 04:38:45 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Mar 2023 04:38:42 -0700 From: Claudiu Beznea To: , , , , , CC: , , , Claudiu Beznea Subject: [PATCH 5/8] ASoC: mchp-pdmc: return directly ret Date: Wed, 1 Mar 2023 13:38:04 +0200 Message-ID: <20230301113807.24036-6-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230301113807.24036-1-claudiu.beznea@microchip.com> References: <20230301113807.24036-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230301_033846_099582_E696271E X-CRM114-Status: GOOD ( 10.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Return directly ret instead of having different branches for error and OK paths. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-pdmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/atmel/mchp-pdmc.c b/sound/soc/atmel/mchp-pdmc.c index 6ec5324fd65e..853a7adfd654 100644 --- a/sound/soc/atmel/mchp-pdmc.c +++ b/sound/soc/atmel/mchp-pdmc.c @@ -759,12 +759,10 @@ static int mchp_pdmc_pcm_new(struct snd_soc_pcm_runtime *rtd, int ret; ret = mchp_pdmc_add_chmap_ctls(rtd->pcm, dd); - if (ret < 0) { + if (ret < 0) dev_err(dd->dev, "failed to add channel map controls: %d\n", ret); - return ret; - } - return 0; + return ret; } static struct snd_soc_dai_driver mchp_pdmc_dai = {