summaryrefslogtreecommitdiff
path: root/src/soc/intel/meteorlake
diff options
context:
space:
mode:
authorKarthikeyan Ramasubramanian <kramasub@google.com>2024-11-07 12:10:23 -0700
committerJon Murphy <jpmurphy@google.com>2024-11-07 20:00:39 +0000
commit0714d5cc8a6c7a8bad4f0a3e605e3a576f32502e (patch)
treed998db371f2f7fdce2e7a42fe1d30474df3250cc /src/soc/intel/meteorlake
parent1c69877328187b44c0327f15e84873ef6352c90c (diff)
soc/intel/[tiger|cannon|meteor]lake: Fix uninitialized usb_cfg pointer
This patch addresses uninitialized usb_cfg pointer warning which is also an error - src/soc/intel/meteorlake/fsp_params.c: error: 'usb_cfg' may be used uninitialized in this function [-Werror=maybe-uninitialized] BUG=None TEST=./util/abuild/abuild for GOOGLE_HATCH, GOOGLE_VOLTEER, GOOGLE_KARIS Change-Id: I169b6d3a979c4db78e7c0932a126d8b0a9306da7 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85026 Reviewed-by: Jon Murphy <jpmurphy@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/soc/intel/meteorlake')
-rw-r--r--src/soc/intel/meteorlake/fsp_params.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c
index c2770e630c..0ae36e6997 100644
--- a/src/soc/intel/meteorlake/fsp_params.c
+++ b/src/soc/intel/meteorlake/fsp_params.c
@@ -578,7 +578,7 @@ static void fill_fsps_cnvi_params(FSP_S_CONFIG *s_cfg,
const struct soc_intel_meteorlake_config *config)
{
struct device *port = NULL;
- struct drivers_usb_acpi_config *usb_cfg;
+ struct drivers_usb_acpi_config *usb_cfg = NULL;
bool usb_audio_offload = false;
/* Search through the devicetree for matching USB devices */
@@ -615,7 +615,7 @@ static void fill_fsps_cnvi_params(FSP_S_CONFIG *s_cfg,
if (s_cfg->CnviBtAudioOffload && !usb_audio_offload) {
printk(BIOS_WARNING, "CNVi BT Audio offload enabled but not in USB driver\n");
}
- if (!s_cfg->CnviBtAudioOffload && usb_audio_offload) {
+ if (!s_cfg->CnviBtAudioOffload && usb_cfg && usb_audio_offload) {
printk(BIOS_ERR, "USB BT Audio offload enabled but CNVi BT offload disabled\n");
usb_cfg->cnvi_bt_audio_offload = 0;
}