diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2024-10-31 13:00:37 -0700 |
---|---|---|
committer | Karthik Ramasubramanian <kramasub@google.com> | 2024-11-06 22:43:16 +0000 |
commit | 1d9bddf1632ccbb7ffd5d92c4608c3065df72c0f (patch) | |
tree | 53da6693b7eb184466d317954ace2e53fe4bda25 /src/soc | |
parent | 2ba74b8c188b8234131dff7e12284becf34a6f2f (diff) |
soc/intel/alderlake: Fix uninitialized usb_cfg pointer
This patch addresses uninitialized usb_cfg pointer warning which is also
an error - src/soc/intel/alderlake/fsp_params.c:936:48: error: 'usb_cfg'
may be used uninitialized in this function [-Werror=maybe-uninitialized]
BUG=None
TEST=./util/abuild/abuild
Change-Id: I764fed561dfe2a571f3404fe505997edd7aa5ff7
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84939
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/alderlake/fsp_params.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/soc/intel/alderlake/fsp_params.c b/src/soc/intel/alderlake/fsp_params.c index 839d161eae..d4cbf0fd4f 100644 --- a/src/soc/intel/alderlake/fsp_params.c +++ b/src/soc/intel/alderlake/fsp_params.c @@ -897,7 +897,7 @@ static void fill_fsps_cnvi_params(FSP_S_CONFIG *s_cfg, const struct soc_intel_alderlake_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 */ @@ -931,7 +931,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; } |