diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-11-02 14:41:33 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-11-02 14:41:33 -0700 |
| commit | cf07c2010332b3a4efe411db49d349e7908a6df1 (patch) | |
| tree | c278073d993ffab61270b05e597aeac4e072e2e7 | |
| parent | d8ad28c00822a30b4c6f94207b355e0c9ec7345a (diff) | |
| parent | 1fcf0af78a0929ab48a6a82488878630df5fd933 (diff) | |
Merge "ASoC: wcd934x: Initialize mbhc pointer before access"
| -rw-r--r-- | sound/soc/codecs/wcd934x/wcd934x-mbhc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/wcd934x/wcd934x-mbhc.c b/sound/soc/codecs/wcd934x/wcd934x-mbhc.c index 64c33c082b4b..5dbdb9a2df00 100644 --- a/sound/soc/codecs/wcd934x/wcd934x-mbhc.c +++ b/sound/soc/codecs/wcd934x/wcd934x-mbhc.c @@ -1015,6 +1015,7 @@ int tavil_mbhc_init(struct wcd934x_mbhc **mbhc, struct snd_soc_codec *codec, 0; } + (*mbhc) = wcd934x_mbhc; snd_soc_add_codec_controls(codec, impedance_detect_controls, ARRAY_SIZE(impedance_detect_controls)); snd_soc_add_codec_controls(codec, hph_type_detect_controls, @@ -1023,8 +1024,6 @@ int tavil_mbhc_init(struct wcd934x_mbhc **mbhc, struct snd_soc_codec *codec, snd_soc_update_bits(codec, WCD934X_MBHC_NEW_CTL_1, 0x04, 0x04); snd_soc_update_bits(codec, WCD934X_MBHC_CTL_BCS, 0x01, 0x01); - (*mbhc) = wcd934x_mbhc; - return 0; err: devm_kfree(codec->dev, wcd934x_mbhc); |
