Skip to content

Commit cc26638

Browse files
RanderWangplbossart
authored andcommitted
fixup: ASoC: codec: max98373: return error if tx_mask is set
It is instructive for developer. Signed-off-by: Rander Wang <rander.wang@intel.com>
1 parent 104b7c9 commit cc26638

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sound/soc/codecs/max98373-sdw.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,10 @@ static int max98373_sdw_set_tdm_slot(struct snd_soc_dai *dai,
779779
struct max98373_priv *max98373 =
780780
snd_soc_component_get_drvdata(component);
781781

782-
/* tx_mask is ignored since it's irrelevant for I/V feedback */
782+
/* tx_mask is unused since it's irrelevant for I/V feedback */
783+
if (tx_mask)
784+
return -EINVAL;
785+
783786
if (!rx_mask && !slots && !slot_width)
784787
max98373->tdm_mode = false;
785788
else

0 commit comments

Comments
 (0)