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 B036B1C4A2D; Tue, 26 Aug 2025 13:01:20 +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=1756213280; cv=none; b=tWTbT6BYBL8CtIIk/xtVzzwHGo6ilRZdqpoxPNW2gIOPlHPWLiSpksuDTR0gPwfQuqReZENqC3R8I0ypdZ5NeT0Uc9T/c7wFbC00waQjpDXucY5Xbt6Iy0L3l0N20NolyOeRxfLo0uY7E5wzVxvZ3+cKOafad/Zv0aGniUGfZdc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756213280; c=relaxed/simple; bh=xpUD+Ew7h0e78ST2DlG/mXnPWzxwmGLxGCY4t99Isu4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fHFrif6eoGNIThUNGihvUb221arN6xK1RadKdBHDchRSKf3JtgLaL6Im7siEIOWB3UZEHSMvSXOkdrD6j0cccj+qL9SEPoHrrOzaa+X+IUKN7J78oIMlUIslFudbC4hdCqOTNsAx1of4E/lVWoB/7/8Ko1/pQxso2QctVYGRToA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TsjiuXPI; 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="TsjiuXPI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A6F5C4CEF1; Tue, 26 Aug 2025 13:01:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756213280; bh=xpUD+Ew7h0e78ST2DlG/mXnPWzxwmGLxGCY4t99Isu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TsjiuXPIfCd6WYqW8QojVbbiTQUT+jGHNkJuGjMNLu3aiHHtUJev9xCb+TNNFO8sg nXjfwlERgPQrbpLAjiCS5k1TGiFDly+LBhUURlCod+5gtuLri+WG4qrndSrqGgv1ts sWxrfhXIHtbozCedRMlAvKDf4faeVyeBCS9Kvn5Y= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Amadeusz=20S=C5=82awi=C5=84ski?= , Cezary Rojewski , Mark Brown , Sasha Levin Subject: [PATCH 6.6 287/587] ASoC: Intel: avs: Fix uninitialized pointer error in probe() Date: Tue, 26 Aug 2025 13:07:16 +0200 Message-ID: <20250826111000.230823235@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110952.942403671@linuxfoundation.org> References: <20250826110952.942403671@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cezary Rojewski [ Upstream commit 11f74f48c14c1f4fe16541900ea5944c42e30ccf ] If pcim_request_all_regions() fails, error path operates on uninitialized 'bus' pointer. Found out by Coverity static analyzer. Reviewed-by: Amadeusz Sławiński Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20250730124906.351798-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/avs/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c index 63e4356e8caf..8f36cef88fe6 100644 --- a/sound/soc/intel/avs/core.c +++ b/sound/soc/intel/avs/core.c @@ -415,6 +415,8 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id) adev = devm_kzalloc(dev, sizeof(*adev), GFP_KERNEL); if (!adev) return -ENOMEM; + bus = &adev->base.core; + ret = avs_bus_init(adev, pci, id); if (ret < 0) { dev_err(dev, "failed to init avs bus: %d\n", ret); @@ -425,7 +427,6 @@ static int avs_pci_probe(struct pci_dev *pci, const struct pci_device_id *id) if (ret < 0) return ret; - bus = &adev->base.core; bus->addr = pci_resource_start(pci, 0); bus->remap_addr = pci_ioremap_bar(pci, 0); if (!bus->remap_addr) { -- 2.39.5