Message ID | 20230307040938.7484-3-trevor.wu@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2232478wrd; Mon, 6 Mar 2023 20:17:21 -0800 (PST) X-Google-Smtp-Source: AK7set/nEGMz/iW0bm6aSjQIGE5ABP2azdVvy/ErJFpRBwOGrlUl0Y3OsgPL7PurS8/L66BPR1kd X-Received: by 2002:a17:90b:3505:b0:22b:b282:a9d7 with SMTP id ls5-20020a17090b350500b0022bb282a9d7mr13208292pjb.20.1678162641056; Mon, 06 Mar 2023 20:17:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678162641; cv=none; d=google.com; s=arc-20160816; b=JFWtNNiP2btImrE2isy32E40P0yjayC+3hSB6QAtofumcwYkxGWAV1zk9tRwf46UTv 00e8oFZw+3XiNdya5qRlKMej2yi5ywuYh9mdZ2xrc7HZeAC8MrPQuZJeraAN9SIa6sxZ heeD9ojLyY/dS3f1V+hWYUUt3fjjeqiMdlJa7mSp6GrAiZ91A1tdecb2sgl099+wR+BB G9HBbYd+xibTv3hxRpZS/jHKrVIBstJH0pSKZV0U5KdwxBqSKbP7Atw12TGVYCTKvVKU BGc+k02DdxQ7kXyvce0WWUUJICS0KjE9yNCcC/TYPJMZei6C5Zgy7d4OzGAn3u6+ytsr pAPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=930esi92rt5qlOQCRXhLgNnk29G6f6McGsLWj8Z35LM=; b=hfTw9UVXyM0PKPweI55uxZnGV3mYyVfwbznb/Sj8svfbn/AQMySNSop/v8nNRi6X27 VHnpo1qRRTn/OI1bc4E8c6qntW5fmw6yVN6ZYmd5SYtcN81z+wCmhwqXG0LU5+stA0yp HNCW7oEpWSP3F8yVwOaCeFio2zxXfC/vGIoRdtzsBUMZyuwmt0d1KZas5hfpWUJpqxj8 ZZctVZ2OsZ765RFqkGp48utBkCmy1lUBuWJ3QWnkf+z0c9mGXcLDgbQXWyK+nQhpWXzf YxpDNh1T4gzgw1N6wOjTeb8F+MErnmBQusGaTycKFmOuTC5fQlHIvGRUsrNRVSZ09cX/ TPvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Vk5hcB+8; 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=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a17090a68cd00b0022bb87f2dfdsi10997197pjj.129.2023.03.06.20.17.08; Mon, 06 Mar 2023 20:17:21 -0800 (PST) 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=@mediatek.com header.s=dk header.b=Vk5hcB+8; 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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbjCGEJ4 (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 6 Mar 2023 23:09:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229933AbjCGEJt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 6 Mar 2023 23:09:49 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 980BF2E826 for <linux-kernel@vger.kernel.org>; Mon, 6 Mar 2023 20:09:48 -0800 (PST) X-UUID: e37f317cbc9d11ed945fc101203acc17-20230307 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=930esi92rt5qlOQCRXhLgNnk29G6f6McGsLWj8Z35LM=; b=Vk5hcB+8/zfR+tmCfdTQOsnI+fzj2VXNWsLhzqAK7wRXq9S/KHNz9KrfNnHEE9ptPM2q1R80toslQ2iU8KgWL4hqSYJxoJ4zzh9EU+vl83YYSpf40TBFkxv1v0RPAC2S8zzDfyIZfpC8+ZrOmyWydp6VpRI7mpxyQHuFejrdcA4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.20,REQID:c5ab0a65-97ad-428a-bb3d-de2204c49c1c,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:25b5999,CLOUDID:2e70faf4-ddba-41c3-91d9-10eeade8eac7,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-UUID: e37f317cbc9d11ed945fc101203acc17-20230307 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from <trevor.wu@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2020605513; Tue, 07 Mar 2023 12:09:43 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Tue, 7 Mar 2023 12:09:41 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Tue, 7 Mar 2023 12:09:41 +0800 From: Trevor Wu <trevor.wu@mediatek.com> To: <broonie@kernel.org>, <lgirdwood@gmail.com>, <tiwai@suse.com>, <perex@perex.cz>, <matthias.bgg@gmail.com>, <angelogioacchino.delregno@collabora.com> CC: <trevor.wu@mediatek.com>, <jiaxin.yu@mediatek.com>, <alsa-devel@alsa-project.org>, <linux-mediatek@lists.infradead.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH 2/4] ASoC: mediatek: mt9195-mt6359: fix UNINIT problem Date: Tue, 7 Mar 2023 12:09:36 +0800 Message-ID: <20230307040938.7484-3-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230307040938.7484-1-trevor.wu@mediatek.com> References: <20230307040938.7484-1-trevor.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759681069859329737?= X-GMAIL-MSGID: =?utf-8?q?1759681069859329737?= |
Series |
ASoC: mediatek: fix coverity problems
|
|
Commit Message
Trevor Wu (吳文良)
March 7, 2023, 4:09 a.m. UTC
Coverity shows using uninitialized value monitor. When regmap_read
returns an error, monitor keeps the value left from earlier
computation. To prevent from the unexpected result in the case, assign
0 to monitor.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
---
sound/soc/mediatek/mt8195/mt8195-mt6359.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c index 4682748d82be..ceca882ecff7 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c @@ -158,7 +158,7 @@ static int mt8195_mt6359_mtkaif_calibration(struct snd_soc_pcm_runtime *rtd) int mtkaif_phase_cycle[MT8195_MTKAIF_MISO_NUM]; int mtkaif_calibration_num_phase; bool mtkaif_calibration_ok; - unsigned int monitor; + unsigned int monitor = 0; int counter; int phase; int i;