From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 659694315A; Mon, 23 Jun 2025 21:48:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750715319; cv=none; b=aa7HfvnXmVP0EK5BLFoexn3E/uQGY0ZALVUciSyKDen25aqK1U+JnUBLbAO0nUTrbuUHU5dF88utj45MdrK4uTejQSQRlDzPeqr/V8Kebz+xFy8TKdP8JRPJiZ+n1Rs2Qnw+zPvwqx2XTT6QcLgicDs6IlzwVbwSdAxlQv6ZadA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750715319; c=relaxed/simple; bh=MEG2EPT2P/tBAr2OqcOnEBYe7LS1RiD24yH3oOSbY0E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HfobFumux6Koy702OVrk+VzDEyz8ihXwPPC7avE2G+GVyQOL0C9IzOmGje3hbOhYlqs2+3ThQN/LWiiIrCh/cbMBKB+W3sqjNTIs7FBLW+W++0ip4i/2EFT5F7S8eYJpF1Q2NT7B8aSYG7PZeMF4lb42Y8nplXKj2CPKAfybScg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gsywkT3x; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gsywkT3x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0DBEC4CEEA; Mon, 23 Jun 2025 21:48:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750715319; bh=MEG2EPT2P/tBAr2OqcOnEBYe7LS1RiD24yH3oOSbY0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gsywkT3x/IxsUWj3lm2g24XtfHPMG4YhOj+FhSt5fgeXc9IG+czwJ2J1lJ3ptaQb9 N4+Zj8mOnyqE71/KfL8Vqu8UX2a2o6TAzE5BGfY2H6sXoHFgU+jT0TCyy9+5a+P/bQ HFkOHsp2SIjvVAw6UHfS/UwQADqOddDVL56WG8FE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, I Hsin Cheng , Mark Brown , Sasha Levin Subject: [PATCH 6.12 175/414] ASoC: intel/sdw_utils: Assign initial value in asoc_sdw_rt_amp_spk_rtd_init() Date: Mon, 23 Jun 2025 15:05:12 +0200 Message-ID: <20250623130646.402787524@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130642.015559452@linuxfoundation.org> References: <20250623130642.015559452@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: I Hsin Cheng [ Upstream commit 5fb3878216aece471af030b33a9fbef3babd8617 ] Initialize "ret" with "-EINVAL" to handle cases where "strstr()" for "codec_dai->component->name_prefix" doesn't find "-1" nor "-2". In that case "name_prefix" is invalid because for current implementation it's expected to have either "-1" or "-2" in it. (Maybe "-3", "-4" and so on in the future.) Link: https://scan5.scan.coverity.com/#/project-view/36179/10063?selectedIssue=1627120 Signed-off-by: I Hsin Cheng Link: https://patch.msgid.link/20250505185423.680608-1-richard120310@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/sdw_utils/soc_sdw_rt_amp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sdw_utils/soc_sdw_rt_amp.c b/sound/soc/sdw_utils/soc_sdw_rt_amp.c index 6951dfb565263..b3d6ca2499734 100644 --- a/sound/soc/sdw_utils/soc_sdw_rt_amp.c +++ b/sound/soc/sdw_utils/soc_sdw_rt_amp.c @@ -190,7 +190,7 @@ int asoc_sdw_rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc const struct snd_soc_dapm_route *rt_amp_map; char codec_name[CODEC_NAME_SIZE]; struct snd_soc_dai *codec_dai; - int ret; + int ret = -EINVAL; int i; rt_amp_map = get_codec_name_and_route(dai, codec_name); -- 2.39.5