Skip to contentSkip to conversation

ASoC: tas2562: Return invalid for when bitwidth is invalid

PATCH RESEND New Dan Murphy 1 participant 1 message Feb 18, 2020

Subsystems (3)
lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

PATCH RESEND 1/1 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")
---
 sound/soc/codecs/tas2562.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/tas2562.c +2 -1
index 729acd874c48..5b4803a76719 100644
@@ -215,7 +215,8 @@ static int tas2562_set_bitwidth(struct tas2562_data *tas2562, int bitwidth)
 		break;
 
 	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,
Signature · 1 line
2.25.0