OSDN Git Service

Merge "sdm660_cdc: Fix NULL pointer dereference in digital suspend"
authorLinux Build Service Account <lnxbuild@localhost>
Wed, 27 Jun 2018 21:44:14 +0000 (14:44 -0700)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 27 Jun 2018 21:44:14 +0000 (14:44 -0700)
sound/soc/codecs/sdm660_cdc/msm-digital-cdc.c

index f4546f4..a80ac1d 100644 (file)
@@ -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__);