mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
Merge "ASoC: error check for backend index and MCLK src"
This commit is contained in:
commit
6b3783e3b8
1 changed files with 2 additions and 2 deletions
|
|
@ -31245,12 +31245,12 @@ static int msm_routing_put_mclk_src_cfg(struct snd_kcontrol *kcontrol,
|
|||
mclk_src_id = ucontrol->value.integer.value[1];
|
||||
mclk_freq = ucontrol->value.integer.value[2];
|
||||
|
||||
if (be_idx < 0 && be_idx >= MSM_BACKEND_DAI_MAX) {
|
||||
if (be_idx < 0 || be_idx >= MSM_BACKEND_DAI_MAX) {
|
||||
pr_err("%s: Invalid be id %d\n", __func__, be_idx);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (mclk_src_id < MCLK_SRC_INT && mclk_src_id >= MCLK_SRC_MAX) {
|
||||
if (mclk_src_id < MCLK_SRC_INT || mclk_src_id >= MCLK_SRC_MAX) {
|
||||
pr_err("%s: Invalid MCLK src %d\n", __func__, mclk_src_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue