From patchwork Tue Dec 6 21:25:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 631909 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 640C9C3A5A7 for ; Tue, 6 Dec 2022 21:27:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5168716FB; Tue, 6 Dec 2022 22:26:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5168716FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1670362034; bh=GDCIlh30cdWhTy20dGUhF0iFrWH3dw0Pi1Z6+w5JVmw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=eJ37U3K8oRMUefHN8w959p4AQJOQogb59M0RI5jZXHFCdrNB2LsjAap7ZCgpQ++7y avWCBT1jtmOjcCH902Qfy2vtqNU1QCh6Msu632IQEa+ZBudaYkrgd4XdN7YAAyyUbQ bT1vA7IC6mByA8vxg3lhM62DllE017EdHNGqVAbI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B7D5BF8054A; Tue, 6 Dec 2022 22:25:40 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EF1F6F8055A; Tue, 6 Dec 2022 22:25:39 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3A9D8F804B0 for ; Tue, 6 Dec 2022 22:25:33 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3A9D8F804B0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LfBGZBxm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670361934; x=1701897934; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GDCIlh30cdWhTy20dGUhF0iFrWH3dw0Pi1Z6+w5JVmw=; b=LfBGZBxmRxjN2LKxyjzH2fZHN7UMr/jtULAxJG4dx8h0hzHNKomxcsZg veUC1MFsOUMFoDa/6Vf2lkJVdkrJ02EQR9MQnqEHkVCwrnUdJ1HFNucZ1 2VJWSaB21rDSECLC0B55BNJsmhNFO0HTuVa2R+GHkFytVE4gqrgNk0RY4 O2fzIAx+mp2FoLcu1m6+Hxuycbaic7jJ3z1V5g7d148KabhJbaoVenr27 JyMFmYAN1XRpxgY0Ltw3VlfcLdCZHTjfYH5uEHeg1KmT4Q7Nf6f5gANZo KfKT10tlZ0Yy13gVt3XOHI9oXZI7z0/lVeGfJE7cFxXEdOK5afCbFYvNv Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="300154679" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="300154679" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 13:25:27 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="646362661" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="646362661" Received: from rwwalthe-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.213.186.124]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 13:25:26 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 3/3] ASoC: Intel: sof_realtek_common: set ret = 0 as initial value Date: Tue, 6 Dec 2022 15:25:07 -0600 Message-Id: <20221206212507.359993-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221206212507.359993-1-pierre-louis.bossart@linux.intel.com> References: <20221206212507.359993-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, broonie@kernel.org, Bard Liao , Ranjani Sridharan , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Bard Liao 'ret' will not be initialized if dai_fmt is not DSP_A or DSP_B. Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_realtek_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/sof_realtek_common.c b/sound/soc/intel/boards/sof_realtek_common.c index ff2851fc8930a..6c12ca92f3713 100644 --- a/sound/soc/intel/boards/sof_realtek_common.c +++ b/sound/soc/intel/boards/sof_realtek_common.c @@ -267,7 +267,8 @@ static int rt1015_hw_params(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *codec_dai; - int i, clk_freq, ret; + int i, clk_freq; + int ret = 0; clk_freq = sof_dai_get_bclk(rtd);