Commit 9c28423d authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Mark Brown

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: 9362ab78 ("ASoC: SOF: Intel: add abstraction for SoundWire wake-ups")
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230809-intel-hda-missing-chip-init-v1-1-61557ca6fa8a@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 81113108
...@@ -420,6 +420,7 @@ static bool hda_sdw_check_wakeen_irq(struct snd_sof_dev *sdev) ...@@ -420,6 +420,7 @@ static bool hda_sdw_check_wakeen_irq(struct snd_sof_dev *sdev)
if (!(interface_mask & BIT(SOF_DAI_INTEL_ALH))) if (!(interface_mask & BIT(SOF_DAI_INTEL_ALH)))
return false; return false;
chip = get_chip_info(sdev->pdata);
if (chip && chip->check_sdw_wakeen_irq) if (chip && chip->check_sdw_wakeen_irq)
return chip->check_sdw_wakeen_irq(sdev); return chip->check_sdw_wakeen_irq(sdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment