Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 687a4eb8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: sdm660_cdc: Add null check in msm_dig_suspend"

parents e3cfe4f4 5a51c2c5
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -2085,10 +2085,18 @@ static int msm_dig_cdc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM
static int msm_dig_suspend(struct device *dev)
{
	struct msm_asoc_mach_data *pdata =
	snd_soc_card_get_drvdata(registered_digcodec->component.card);
	struct msm_asoc_mach_data *pdata;
	struct msm_dig_priv *msm_dig_cdc = dev_get_drvdata(dev);

	if (!registered_digcodec || !msm_dig_cdc) {
		pr_debug("%s:digcodec 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__);
		return 0;
	}
	if (msm_dig_cdc->dapm_bias_off) {
		pr_debug("%s: mclk cnt = %d, mclk_enabled = %d\n",
			__func__, atomic_read(&pdata->int_mclk0_rsc_ref),