From patchwork Fri Aug 25 15:36:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandra Diupina X-Patchwork-Id: 13366084 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 7C3BAC3DA6F for ; Fri, 25 Aug 2023 15:37:58 +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: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:In-Reply-To:References: List-Owner; bh=UBPCO+bt7n6AnolQnCQdVhxuWqD6L97miyDFBrB4RaA=; b=LyX3ijSyQkyDub +QPN7M/4mw/bqSZN5hFSerIllFUN0bu4E4FHsc1NYacNJdJicoLNaVlsXTqNvZXo+gWFmeOeFbnHk utOHZ9MuO1g8jdY27mrAUuAXkl92ghiOJZsbcAWiLluX+xDxFjyn/JNIW1xadCzapVO4Ai2TwMs9d xNSpPAwLEEXcvPt72Yc6hkbuZy89efh8NJZwcNRJ82nGQCnBHoT2o+ddqjABCZ7rUD9qjYij1KiY2 IQZ2t3hjWfGOVY2kz44Pj/SjfGFLM7+zpkmP9Is8RlHS6cdgRjh+l6aCSudbuFdImek12DwB9TveY 4S/OyuENNZXEWYDweRsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZYsJ-005h8x-36; Fri, 25 Aug 2023 15:37:27 +0000 Received: from mail.astralinux.ru ([217.74.38.119]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZYsF-005h7C-1Q; Fri, 25 Aug 2023 15:37:25 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 202671868942; Fri, 25 Aug 2023 18:37:07 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id v73nNLLpUn7Y; Fri, 25 Aug 2023 18:37:06 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 87BBD1867579; Fri, 25 Aug 2023 18:37:06 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id I_6nBa4-AHub; Fri, 25 Aug 2023 18:37:06 +0300 (MSK) Received: from rbta-msk-lt-302690.astralinux.ru (unknown [10.177.233.189]) by mail.astralinux.ru (Postfix) with ESMTPSA id 72BA51868950; Fri, 25 Aug 2023 18:37:04 +0300 (MSK) From: Alexandra Diupina To: Liam Girdwood Cc: Alexandra Diupina , Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , Eason Yen , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Subject: [PATCH] asoc: mediatek: common: Remove check of return value of mtk_memif_set_addr() and mtk_memif_set_format() Date: Fri, 25 Aug 2023 18:36:50 +0300 Message-Id: <20230825153650.20923-1-adiupina@astralinux.ru> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230825_083723_676848_4D7A16EC X-CRM114-Status: UNSURE ( 7.38 ) X-CRM114-Notice: Please train this message. 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 The mtk_memif_set_addr() and mtk_memif_set_format() functions always returns 0, so it is necessary to remove the check of its return value (which was probably specified by analogy with the check of return values for other functions) to make the code more readable Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: df799b9502ed ("ASoC: mediatek: common: refine hw_params and hw_prepare") Signed-off-by: Alexandra Diupina --- sound/soc/mediatek/common/mtk-afe-fe-dai.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sound/soc/mediatek/common/mtk-afe-fe-dai.c b/sound/soc/mediatek/common/mtk-afe-fe-dai.c index 882cdf86c8bf..3c8a11c5958d 100644 --- a/sound/soc/mediatek/common/mtk-afe-fe-dai.c +++ b/sound/soc/mediatek/common/mtk-afe-fe-dai.c @@ -143,15 +143,10 @@ int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream, substream->runtime->dma_bytes); /* set addr */ - ret = mtk_memif_set_addr(afe, id, + mtk_memif_set_addr(afe, id, substream->runtime->dma_area, substream->runtime->dma_addr, substream->runtime->dma_bytes); - if (ret) { - dev_err(afe->dev, "%s(), error, id %d, set addr, ret %d\n", - __func__, id, ret); - return ret; - } /* set channel */ ret = mtk_memif_set_channel(afe, id, channels); @@ -170,12 +165,7 @@ int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream, } /* set format */ - ret = mtk_memif_set_format(afe, id, format); - if (ret) { - dev_err(afe->dev, "%s(), error, id %d, set format %d, ret %d\n", - __func__, id, format, ret); - return ret; - } + mtk_memif_set_format(afe, id, format); return 0; }