mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
Merge "asoc: codecs: add null check before access"
This commit is contained in:
commit
0d9b09f760
1 changed files with 7 additions and 0 deletions
|
|
@ -1355,6 +1355,13 @@ int wcd938x_micbias_control(struct snd_soc_component *component,
|
|||
__func__, micb_index);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (NULL == wcd938x) {
|
||||
dev_err(component->dev,
|
||||
"%s: wcd938x private data is NULL\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
switch (micb_num) {
|
||||
case MIC_BIAS_1:
|
||||
micb_reg = WCD938X_ANA_MICB1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue