summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-06-27 14:44:14 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-27 14:44:14 -0700
commit66c519deb658ad6c8395d681bc6123a8098a7752 (patch)
tree7b1de5ae26341d1dd2c3686d2469470982832ff9 /sound
parentb6a5f537411c389fa57e2d204c15ca167bc88090 (diff)
parent1ae05057ff531c464df08e9be865e6cfe2454fce (diff)
Merge "sdm660_cdc: Fix NULL pointer dereference in digital suspend"
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c b/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c
index f4546f4fdcc2..a80ac1d18298 100644
--- a/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c
+++ b/sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c
@@ -2157,6 +2157,10 @@ static int msm_dig_suspend(struct device *dev)
pr_debug("%s:digcodec not initialized, return\n", __func__);
return 0;
}
+ if (!registered_digcodec->component.card) {
+ pr_debug("%s:component not initialized, return\n", __func__);
+ return 0;
+ }
pdata = snd_soc_card_get_drvdata(registered_digcodec->component.card);
if (!pdata) {
pr_debug("%s:card not initialized, return\n", __func__);