Prechádzať zdrojové kódy

dsp: Correct the condition check of apm ready.

Correct the condition check of apm ready status during
prm_send_pkt, loop should exit if apm is ready or retry
count exceeds max count.

Change-Id: I0c32731cb3696ef388a0d17d873a8b1485b54805
Signed-off-by: Ritu Sharma <[email protected]>
Ritu Sharma 3 rokov pred
rodič
commit
cd090cb9e9
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      dsp/audio_prm.c

+ 2 - 2
dsp/audio_prm.c

@@ -102,9 +102,9 @@ static int prm_gpr_send_pkt(struct gpr_pkt *pkt, wait_queue_head_t *wait)
 			(gpr_get_q6_state() == GPR_SUBSYS_LOADED)) {
 		pr_info("%s: apm ready check not done\n", __func__);
 		retry = 0;
-		while (!spf_core_is_apm_ready() || retry < MAX_RETRY_COUNT) {
+		while (!spf_core_is_apm_ready() && retry < MAX_RETRY_COUNT) {
 			msleep(APM_READY_WAIT_DURATION);
-			retry++;
+			++retry;
 		}
 		is_apm_ready_check_done = true;
 		pr_info("%s: apm ready check done\n", __func__);