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

Commit e5159cdc authored by Vignesh Kulothungan's avatar Vignesh Kulothungan Committed by Gerrit - the friendly Code Review server
Browse files

dsp: asm: split check condition for NULL and stale



Split the muli-check condition into two separate check conditions.
Suppress the logs for stale condition to debug.

CRs-Fixed: 2307741
Change-Id: I984a2ea7928de052e993e77db807df83109ab423
Signed-off-by: default avatarVignesh Kulothungan <vigneshk@codeaurora.org>
parent 186f8478
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -10136,9 +10136,15 @@ int q6asm_send_cal(struct audio_client *ac)
	memset(&mem_hdr, 0, sizeof(mem_hdr));
	mutex_lock(&cal_data[ASM_AUDSTRM_CAL]->lock);
	cal_block = cal_utils_get_only_cal_block(cal_data[ASM_AUDSTRM_CAL]);
	if (cal_block == NULL || cal_utils_is_cal_stale(cal_block)) {
	if (cal_block == NULL) {
		pr_err("%s: cal_block is NULL\n",
			__func__);
		goto unlock;
	}

	if (cal_utils_is_cal_stale(cal_block)) {
		rc = 0; /* not error case */
		pr_err("%s: cal_block is NULL or stale\n",
		pr_debug("%s: cal_block is stale\n",
			__func__);
		goto unlock;
	}