diff options
author | Nathan Chancellor <nathan@kernel.org> | 2023-08-09 11:12:07 -0700 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-08-10 00:27:23 +0100 |
commit | 9c28423d3caae63e665e2b8d704fa41ac823b2a6 (patch) | |
tree | a4ebddb1de7298fe1a01c8d1419958687887c7f2 /sound/soc/sof/intel | |
parent | 81113108491edc277d61337ea410c5f89d85faa3 (diff) |
ASoC: SOF: Intel: Initialize chip in hda_sdw_check_wakeen_irq()
Clang warns (or errors with CONFIG_WERROR):
sound/soc/sof/intel/hda.c:423:6: error: variable 'chip' is uninitialized when used here [-Werror,-Wuninitialized]
423 | if (chip && chip->check_sdw_wakeen_irq)
| ^~~~
sound/soc/sof/intel/hda.c:418:39: note: initialize the variable 'chip' to silence this warning
418 | const struct sof_intel_dsp_desc *chip;
| ^
| = NULL
1 error generated.
Add the missing initialization, following the pattern of the other irq
functions.
Fixes: 9362ab78f175 ("ASoC: SOF: Intel: add abstraction for SoundWire wake-ups")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230809-intel-hda-missing-chip-init-v1-1-61557ca6fa8a@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel')
-rw-r--r-- | sound/soc/sof/intel/hda.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 04c748a72b13..15e6779efaa3 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -420,6 +420,7 @@ static bool hda_sdw_check_wakeen_irq(struct snd_sof_dev *sdev) if (!(interface_mask & BIT(SOF_DAI_INTEL_ALH))) return false; + chip = get_chip_info(sdev->pdata); if (chip && chip->check_sdw_wakeen_irq) return chip->check_sdw_wakeen_irq(sdev); |