msm_common.c: fix dereference of pointer 'kctl_pdata' before NULL check
Change-Id: I8d7843b13cdfe3b0e1783acc662e4d06ae7a739a Signed-off-by: Harold Tan <harotan@codeaurora.org>
このコミットが含まれているのは:

committed by
Gerrit - the friendly Code Review server

コミット
fdab4dc6bf
@@ -373,8 +373,8 @@ int msm_channel_map_get(struct snd_kcontrol *kcontrol,
|
|||||||
{
|
{
|
||||||
struct chmap_pdata *kctl_pdata =
|
struct chmap_pdata *kctl_pdata =
|
||||||
(struct chmap_pdata *)kcontrol->private_data;
|
(struct chmap_pdata *)kcontrol->private_data;
|
||||||
struct snd_soc_dai *codec_dai = kctl_pdata->dai;
|
struct snd_soc_dai *codec_dai = NULL;
|
||||||
int backend_id = kctl_pdata->id;
|
int backend_id = 0;
|
||||||
uint32_t rx_ch[MAX_PORT], tx_ch[MAX_PORT];
|
uint32_t rx_ch[MAX_PORT], tx_ch[MAX_PORT];
|
||||||
uint32_t rx_ch_cnt = 0, tx_ch_cnt = 0;
|
uint32_t rx_ch_cnt = 0, tx_ch_cnt = 0;
|
||||||
uint32_t *chmap_data = NULL;
|
uint32_t *chmap_data = NULL;
|
||||||
@@ -385,6 +385,9 @@ int msm_channel_map_get(struct snd_kcontrol *kcontrol,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
codec_dai = kctl_pdata->dai;
|
||||||
|
backend_id = kctl_pdata->id;
|
||||||
|
|
||||||
ret = snd_soc_dai_get_channel_map(codec_dai,
|
ret = snd_soc_dai_get_channel_map(codec_dai,
|
||||||
&tx_ch_cnt, tx_ch, &rx_ch_cnt, rx_ch);
|
&tx_ch_cnt, tx_ch, &rx_ch_cnt, rx_ch);
|
||||||
if (ret || (tx_ch_cnt == 0 && rx_ch_cnt == 0)) {
|
if (ret || (tx_ch_cnt == 0 && rx_ch_cnt == 0)) {
|
||||||
|
新しいイシューから参照
ユーザーをブロックする