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

Commit 40788dc7 authored by Meng Wang's avatar Meng Wang Committed by Gerrit - the friendly Code Review server
Browse files

asoc: lsm: move wakeup source down before return



Wakeup source is not removed before freeing prtd
memory which causes kernel panic during SSR.
Move wakeup source after lsm_client initialization
is done.

Change-Id: I21cdafce84215d3fee3dc972af8e5b469dd5f565
Signed-off-by: default avatarMeng Wang <mengw@codeaurora.org>
parent dbd78e4a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2477,7 +2477,6 @@ static int msm_lsm_open(struct snd_pcm_substream *substream)
	init_waitqueue_head(&prtd->event_wait);
	init_waitqueue_head(&prtd->event_wait);
	init_waitqueue_head(&prtd->period_wait);
	init_waitqueue_head(&prtd->period_wait);
	prtd->substream = substream;
	prtd->substream = substream;
	wakeup_source_init(&prtd->ws, "lsm-client");
	runtime->private_data = prtd;
	runtime->private_data = prtd;
	runtime->hw = msm_pcm_hardware_capture;
	runtime->hw = msm_pcm_hardware_capture;


@@ -2530,6 +2529,7 @@ static int msm_lsm_open(struct snd_pcm_substream *substream)
	prtd->lsm_client->fe_id = rtd->dai_link->id;
	prtd->lsm_client->fe_id = rtd->dai_link->id;
	prtd->lsm_client->unprocessed_data = 0;
	prtd->lsm_client->unprocessed_data = 0;


	wakeup_source_init(&prtd->ws, "lsm-client");
	return 0;
	return 0;
}
}