From patchwork Thu Jun 8 08:47:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 104872 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp136679vqr; Thu, 8 Jun 2023 01:56:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BOuFObf/Xv9fR5h99nmXJ7EqODIV4aUXgW62QgmI8yOcRZca62850a+wCsY2pR34rbjxQ X-Received: by 2002:ac8:5c83:0:b0:3ef:4e85:e76f with SMTP id r3-20020ac85c83000000b003ef4e85e76fmr7130714qta.59.1686214568391; Thu, 08 Jun 2023 01:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686214568; cv=none; d=google.com; s=arc-20160816; b=HYL7IiGoi5AZmpICQg6AcRl85VBIivMW+xc+hJrcLkLTnsyuIqtOCIOEbTmU0Mx+Y0 6hImV5Ky0oXarM7N6AhItwxRR/cs+NsWYWHcS+Ci/BYmXz/5fhuBEKrkYtngvMjNHKeq lHGSGu8JvASnzlPRMz6lHCiuO/0+6u+30ZD5/Ku5vTPtualtkQuYB1/ie1l0L2cxS/9Q xwgxrFxxWXFxOcbNrqxsD2JnyMK9JPzz1onCq/3dTDO57IezqEGEE9vFufOWyxRSJjUn FoydoOuR9qxtUpa/MNeAHMf9WiHNBswbWs2fi2WWSJ0u+oDmc1sNXNnzmolCw9neRjS8 WWBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=THDsO0ciiVSnCPhWhsfc+w9gDpKOq8lEubGk5K9G/Eg=; b=czWzsA8w1/u3HBrHgm+eMJbB6lnto7m4h7+AmhpTBD4qD3robMK6EC8L3IlAkiPcIo 77FIRsJ5/kbioAv6QIkNnFBnstmYteHYVcwVU1QB/qpDhkPyoLWKfbX3gXYIT0ITmHza aw0eqB2FjkiGBW9c+sLBeUEZmNWZL29owhUytrF+z9y1WCjvNLJJMZ+M5iWw6LbHXgCw cVzhtqCMtOr/ePW9k7KogZBmM6Lg9fWpqwukhWAGA7Nzm0ykZZmtprbD6Yp3WY1RHkvQ qb78ReGBV06wjbIcIPtRjm4fMGiyf6cuNsoUMBp3ZyGYvphYdWjh2XibeEOuHQcbDkWy ycJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Gf18HmSx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h130-20020a636c88000000b0052c27a0125bsi673034pgc.738.2023.06.08.01.55.55; Thu, 08 Jun 2023 01:56:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Gf18HmSx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235636AbjFHIsF (ORCPT + 99 others); Thu, 8 Jun 2023 04:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235553AbjFHIro (ORCPT ); Thu, 8 Jun 2023 04:47:44 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2A76273E for ; Thu, 8 Jun 2023 01:47:39 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (unknown [IPv6:2001:b07:2ed:14ed:a962:cd4d:a84:1eab]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8072D6606F17; Thu, 8 Jun 2023 09:47:37 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1686214058; bh=v2RbZsJIF8OTePPv81vl/VBbI91A/spCjRghtDBNM7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gf18HmSx3F3dEulzyCcItyoErGryylnFIIreRlee5hstTnWvpZqirZdfVHhz8G197 kdkwZRySUDM8IkybCap5MZL0Tw6+iL3ERDCi0TIWFnPUkYszkTBXH09G8kFlBGr/Oh gnr8RWhiYZtZ48wF1iRKRzcE0wE6JVyiWWbqEBDOPpbT5Rf7+hQJucVaVXJwPKQwni hfPGvtjB3+QZkV0dTsL6I4bsAXw4kMonXZZbX4BSBPdvrPQBsTPOLE80/QfAPcM5uR L7vnSMA3Fh4ZH9Vok4qVDmVI2Iv2tIjabo/pBR7gEx5bhxnmPLfl7L6G4Hfxacfdz3 +e+X/z2uFLSWA== From: AngeloGioacchino Del Regno To: broonie@kernel.org Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, trevor.wu@mediatek.com, amergnat@baylibre.com, dan.carpenter@linaro.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel@collabora.com Subject: [PATCH 2/5] ASoC: mediatek: mt8188-mt6359: clean up a return in codec_init Date: Thu, 8 Jun 2023 10:47:24 +0200 Message-Id: <20230608084727.74403-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230608084727.74403-1-angelogioacchino.delregno@collabora.com> References: <20230608084727.74403-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768124126981617316?= X-GMAIL-MSGID: =?utf-8?q?1768124126981617316?= From: Dan Carpenter This code triggers a Smatch static checker warning and does sort of look like an error path. sound/soc/mediatek/mt8188/mt8188-mt6359.c:597 mt8188_max98390_codec_init() warn: missing error code? 'ret' However, returning 0 is intentional. Make that explicit. Signed-off-by: Dan Carpenter Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat Reviewed-by: Matthias Brugger --- sound/soc/mediatek/mt8188/mt8188-mt6359.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index 643a7a12a96b..b2735496d140 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -594,7 +594,7 @@ static int mt8188_max98390_codec_init(struct snd_soc_pcm_runtime *rtd) } if (rtd->dai_link->num_codecs <= 2) - return ret; + return 0; /* add widgets/controls/dapm for rear speakers */ ret = snd_soc_dapm_new_controls(&card->dapm, mt8188_rear_spk_widgets,