ASoC: Intel: bxt-da7219-max98357a: return -EINVAL on unrecognized speaker amplifier
Subsystems (4)
PATCH 1/1 ASoC: Intel: bxt-da7219-max98357a: return -EINVAL on unrecognized speaker amplifier
From: Colin Ian King <[email protected]>
Currently if the ctx->spkamp is not recognized an error message is reported but the code continues to set up the device with uninitialized variables such as the number of widgets. Fix this by returning -EINVAL for unrecognized speaker amplifier types.
Addresses-Coverity: ("Uninitialized scalar variable")
--- sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/boards/bxt_da7219_max98357a.c +1 -1
@@ -677,7 +677,7 @@ static int bxt_card_late_probe(struct snd_soc_card *card)break ;default :dev_err (card->dev,"Invalid speaker amplifier %d\n" , ctx->spkamp); -break ; +return -EINVAL ; } err =snd_soc_dapm_new_controls (&card->dapm, widgets, num_widgets);
Signature · 1 line
2.27.0
Quoted 10 lines · Colin King
From: Colin Ian King <[email protected]>
Currently if the
ctx->spkampis not recognized an error message is reported but the code continues to set up the device with uninitialized variables such as the number of widgets. Fix this by returning-EINVALfor unrecognized speaker amplifier types.Addresses-Coverity: ("Uninitialized scalar variable")
Fixes e1435a1feb18 ("ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp")Signed-off-by Colin Ian King <[email protected]>
Sounds good, thanks Colin.
Quoted 18 lines
--- sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/intel/boards/bxt_da7219_max98357a.c +1
-1@@ -677,7 +677,7 @@ static int bxt_card_late_probe(struct snd_soc_card *card)break ;default :dev_err (card->dev,"Invalid speaker amplifier %d\n" , ctx->spkamp); -break ; +return -EINVAL ; } err =snd_soc_dapm_new_controls (&card->dapm, widgets, num_widgets);
Mark Brown
maintainerQuoted 4 lines · Colin King
Currently if the
ctx->spkampis not recognized an error message is reported but the code continues to set up the device with uninitialized variables such as the number of widgets. Fix this by returning-EINVALfor unrecognized speaker amplifier types.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: Intel: bxt-da7219-max98357a: return -EINVAL on unrecognized speaker amplifier
commit: c950e9fcc79b8fedd3126ede4dcd70add8ea5339
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark