Merge "dsp: avtimer: Add adsp ready check before accessing avtimer registers"

This commit is contained in:
qctecmdr 2019-09-21 22:11:08 -07:00 • committed by Gerrit - the friendly Code Review server
commit 05d1cbfdf2

View file

@ -335,6 +335,11 @@ int avcs_core_query_timer_offset(int64_t *av_offset, int32_t clock_id)
uint64_t avtimer_tick_temp, avtimer_tick, sys_time = 0;
struct timespec ts;
if (!atomic_read(&avtimer.adsp_ready)) {
pr_debug("%s:In SSR, return\n", __func__);
return -ENETRESET;
}
if ((avtimer.p_avtimer_lsw == NULL) ||
(avtimer.p_avtimer_msw == NULL)) {
return -EINVAL;