Skip to content

Commit 310006c

Browse files
Dan Murphybroonie
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 96781fd commit 310006c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/codecs/tas2562.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ static int tas2562_set_bitwidth(struct tas2562_data *tas2562, int bitwidth)
215215
break;
216216

217217
default:
218-
dev_info(tas2562->dev, "Not supported params format\n");
218+
dev_info(tas2562->dev, "Unsupported bitwidth format\n");
219+
return -EINVAL;
219220
}
220221

221222
ret = snd_soc_component_update_bits(tas2562->component,

0 commit comments

Comments
 (0)