]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: bxt-da7219-max98357a: return -EINVAL on unrecognized speaker amplifier
authorColin Ian King <colin.king@canonical.com>
Thu, 2 Jul 2020 11:48:35 +0000 (12:48 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 2 Jul 2020 16:18:50 +0000 (17:18 +0100)
commit2b16d77002a5d832d8ecd3f11ef4c69d548c9e88
tree13dbd15bacc983108fb477680d718901d89be77f
parentdb6e8e7592671112684c80fa3cc01337b609f2e3
ASoC: Intel: bxt-da7219-max98357a: return -EINVAL on unrecognized speaker amplifier

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.

Fixes: 6a4aefb9c7a0 ("ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Addresses-Coverity: ("Uninitialized scalar variable")
Link: https://lore.kernel.org/r/20200702114835.37889-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/bxt_da7219_max98357a.c