ASoC: tas2562: Return invalid for when bitwidth is invalid

If the bitwidth passed in to the set_bitwidth function is not supported
then return an error.

Fixes: 29b74236bd57 ("ASoC: tas2562: Introduce the TAS2562 amplifier")
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Link: https://lore.kernel.org/r/20200218185252.26290-1-dmurphy@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Dan Murphy 2020-02-18 12:52:52 -06:00 committed by Mark Brown
parent 96781fd941
commit 310006cab9
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ static int tas2562_set_bitwidth(struct tas2562_data *tas2562, int bitwidth)
break; break;
default: default:
dev_info(tas2562->dev, "Not supported params format\n"); dev_info(tas2562->dev, "Unsupported bitwidth format\n");
return -EINVAL;
} }
ret = snd_soc_component_update_bits(tas2562->component, ret = snd_soc_component_update_bits(tas2562->component,