summaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake
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/cannonlake
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/cannonlake')
-rw-r--r--src/soc/intel/cannonlake/fsp_params.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/intel/cannonlake/fsp_params.c b/src/soc/intel/cannonlake/fsp_params.c
index bd3d1495fe..df5fcee36f 100644
--- a/src/soc/intel/cannonlake/fsp_params.c
+++ b/src/soc/intel/cannonlake/fsp_params.c
@@ -531,7 +531,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
/* Enable CNVi Wifi if enabled in device tree */
#if CONFIG(SOC_INTEL_COMETLAKE)
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 */
@@ -564,7 +564,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
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;
}