mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
ASoC: codecs: Fix slim_tx port configuration for wcd9335
Add check for valid dai_id in slim_tx_mixer_put(). Change-Id: Ic231c81c2cba02ad25fc07783169601dedd352c0 Signed-off-by: Vaishnavi Kommaraju <vkommara@codeaurora.org>
This commit is contained in:
parent
186f847814
commit
3b0d43d89e
1 changed files with 4 additions and 4 deletions
|
|
@ -2372,10 +2372,10 @@ static int slim_tx_mixer_put(struct snd_kcontrol *kcontrol,
|
|||
|
||||
mutex_lock(&tasha_p->codec_mutex);
|
||||
|
||||
if (tasha_p->intf_type != WCD9XXX_INTERFACE_TYPE_SLIMBUS) {
|
||||
if (dai_id != AIF1_CAP) {
|
||||
dev_err(codec->dev, "%s: invalid AIF for I2C mode\n",
|
||||
__func__);
|
||||
if (tasha_p->intf_type == WCD9XXX_INTERFACE_TYPE_SLIMBUS) {
|
||||
if (dai_id >= ARRAY_SIZE(vport_slim_check_table)) {
|
||||
dev_err(codec->dev, "%s: dai_id: %d, out of bounds\n",
|
||||
__func__, dai_id);
|
||||
mutex_unlock(&tasha_p->codec_mutex);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue