From patchwork Tue Mar 7 04:09:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trevor Wu X-Patchwork-Id: 659929 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (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 305CDC678D5 for ; Tue, 7 Mar 2023 04:12:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 43BA010D0; Tue, 7 Mar 2023 05:11:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 43BA010D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1678162359; bh=1DKy/qGyB1beRVV4xZQJjlUx0ir855iud8H78WaXKR4=; h=To:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From:Reply-To:Cc:From; b=oKkHeMZ46ZmhjxW35QlTiLojWMKPXb1bW0CKxa5zcGVsw8VsY6dCZEyxb8pPAlmAa 4iFVsDte3IIwmOcxJs5Pc5BjVJ57wD9WPKYcwHGANXjJxx9ABUjrhT6q0qoAkivgAa RAD8kMPG0te2WsCzm3USn+mIRgphhXQnj8/x1uH0= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2DDEAF80553; Tue, 7 Mar 2023 05:10:21 +0100 (CET) To: , , , , , Subject: [PATCH 0/4] ASoC: mediatek: fix coverity problems Date: Tue, 7 Mar 2023 12:09:34 +0800 X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <167816222047.26.16041202479869475297@mailman-core.alsa-project.org> X-Patchwork-Original-From: Trevor Wu via Alsa-devel From: Trevor Wu Reply-To: Trevor Wu 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 Content-Disposition: inline Coverity reports some UNINIT and CERT STR31-C problems, so we add initialization and dai id check to resolve problems. Trevor Wu (4): ASoC: mediatek: mt8195: add dai id check before accessing array ASoC: mediatek: mt9195-mt6359: fix UNINIT problem ASoC: mediatek: mt6358: fix UNINIT problem ASoC: mediatek: mt6359: fix UNINIT problem sound/soc/codecs/mt6358.c | 2 +- sound/soc/codecs/mt6359.c | 2 +- sound/soc/mediatek/mt8195/mt8195-dai-adda.c | 17 +- sound/soc/mediatek/mt8195/mt8195-dai-etdm.c | 177 +++++++++++++++++--- sound/soc/mediatek/mt8195/mt8195-dai-pcm.c | 26 ++- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 2 +- 6 files changed, 188 insertions(+), 38 deletions(-)