Skip to content
Unverified Commit c950e9fc authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown
Browse files

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: e1435a1f ("ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarPierre-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: default avatarMark Brown <broonie@kernel.org>
parent c8e22990
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment