summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-08-22 04:11:36 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-08-22 04:11:35 -0700
commit232b0f15cc8b29274630519d935278bdbc1dacc8 (patch)
treeaeda346c789c127c01443a2ee9b64569ae888841
parentaf6102c60e82c921e5d228b8e6d956c38e1fd84a (diff)
parent214496cb3d3f4598299508ce95b534c0c564db44 (diff)
Merge "ASoC: core: Fix possible NULL pointer dereference"
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e63b4346e82e..fae57d18bbd7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3063,7 +3063,8 @@ static int snd_soc_codec_set_bias_level(struct snd_soc_dapm_context *dapm,
*/
void snd_soc_card_change_online_state(struct snd_soc_card *soc_card, int online)
{
- snd_card_change_online_state(soc_card->snd_card, online);
+ if (soc_card && soc_card->snd_card)
+ snd_card_change_online_state(soc_card->snd_card, online);
}
EXPORT_SYMBOL(snd_soc_card_change_online_state);