From patchwork Wed Jun 7 14:57:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13270834 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 7F2A5C7EE25 for ; Wed, 7 Jun 2023 14:58:18 +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:Subject:Cc:To: From:Date: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=YpQq8NobbPF4/yTPqrUAmDINelntNfd1fl5lUa5fC10=; b=zmB5x7M3SaV9+B EFCO9bfrkqfR4JXHEFjfqs6eYXHdl4X2U5MbeNd89juENBkVwkqoM1tkgFd6azS5CVvpdk/J0hxun 9N+Yql2b2ujwlv/zsOrk/0uKKOn8+culiZKc6uWqKRMHDQmhn0i4dYTI8jJpF+YmpKLHPRGzdLdvA aVFJepee2gRcfmOyS+UL9A+9KNGkC/GpyOGkukc0H35l41Y8b/lONN3J9SQj3FUU1giLInEz0V2Uc 0uQbHXvSKkCApwKUHZocLVtevGkXsHnCsyb1iVSmD53ZN99A7+DqKaMnmu85+FB7TTxzfPrMUB51j ibk8+Xuze0A1PCa0YSrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6ubg-006KGi-11; Wed, 07 Jun 2023 14:57:52 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6ubc-006KDl-14 for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 14:57:50 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f7f4819256so3470155e9.1 for ; Wed, 07 Jun 2023 07:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686149864; x=1688741864; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=15bcPlwJydkin0B+JJAsu+9McxnbVcGQs6T+4KYVyWQ=; b=qGqDR9tSf/ntbvkpkgaO42huIAJWHmk04412CvhnpxAwQb+CiKuF2lAVZw29BLhpWG wnEIyLfbZ6V/B3sHUTtyet7DHrb3nitMvWBbaZr/H5reMtDydgEwEGviYaeYGS9+xb3u kIXqzZgE/fUMwYd4hwFMmIkC5dye70I+oXc/GMESJ9gC60AhQrvQO9T3suMtQj7N5hBk Al/gAm95BjVudokd3ttDVMayJZuc+XjEdNIJkXQalNv29xxIE7fubija+2srf7PDj/lY +IYE61jg29t+nsXqNc20nwKC7YQziScASypHutUCduar0YEr9hY5dyOeE7tW9C4rKpFm 0wgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686149864; x=1688741864; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=15bcPlwJydkin0B+JJAsu+9McxnbVcGQs6T+4KYVyWQ=; b=LuHNoM4CW3ET2bRXFhVmOZyBVRRc6ydtf10rHG6m+xvQ/E1r6VYv7jsro72U5+aPeN NNxBulONHslD29rJgQTOowbU+CdlpGcTMmfcn/lSbk5m1c/4PM1Wekx4YtM4X/ihYBg/ p7DjrkZEeLT/IJjsaWqXTc0mWK0Xhc/+NGl3X1ACt+wfjw1IfUbWbG2g22yMTTZM2nJC aGzZa8bcZivAaKw6+i8o2Mf0t/Wu8LnAVNRw+U/zcrf7ANNAZhM+4YmMk39VyRuyrw8W NHNIxwBftxZIVMIIbRbMiFQsymlp+1huizjDgImdhnZ55MLm6Z2/Z1g68QLFrJ0ixrzO Z7eA== X-Gm-Message-State: AC+VfDxX/looBUefE5CWNq5gUGhaujjMym9gCfJjZMAsAJpYwT7JK4YZ tHE/foHhJmcAmTPJh6hecb42Nw== X-Google-Smtp-Source: ACHHUZ4Om8wIr2+W8c2m5xch/rF8WjO/ue+qyFCuYy0t+JsljkFHxXGRUHuKnJgvRrjikjox6oNy/w== X-Received: by 2002:a05:600c:ad6:b0:3f7:e629:9f3 with SMTP id c22-20020a05600c0ad600b003f7e62909f3mr4734068wmr.16.1686149864352; Wed, 07 Jun 2023 07:57:44 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id y6-20020adfd086000000b0030631a599a0sm15633048wrh.24.2023.06.07.07.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 07:57:42 -0700 (PDT) Date: Wed, 7 Jun 2023 17:57:38 +0300 From: Dan Carpenter To: Liam Girdwood , Trevor Wu Cc: Mark Brown , Jaroslav Kysela , Takashi Iwai , Matthias Brugger , AngeloGioacchino Del Regno , Alexandre Mergnat , alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, kernel-janitors@vger.kernel.org Subject: [PATCH v2] SoC: mediatek: mt8188-mt6359: clean up a return in codec_init Message-ID: <42f2a995-3545-40bf-82a0-fd9b8abc16ce@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230607_075748_366432_C6088E28 X-CRM114-Status: GOOD ( 14.48 ) 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 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 --- v2: At first I thought this was an error path but it is a not. 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 bc4b74970a46..5ad8d2a5bbc4 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,