lmkd: Fix a comparison operation with uninitialized variable. am: f70a8a260f

Original change: https://android-review.googlesource.com/c/platform/system/memory/lmkd/+/2073128

Change-Id: Ifaa6bf2008bdb73e74b67ce02cc540275b99b9de
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
전윤재 2022-04-27 00:03:53 +00:00 committed by Automerger Merge Worker
commit 1c09b504c8
1 changed files with 2 additions and 1 deletions

View File

@ -3543,7 +3543,8 @@ static void call_handler(struct event_handler_info* handler_info,
resume_polling(poll_params, curr_tm); resume_polling(poll_params, curr_tm);
break; break;
case POLLING_DO_NOT_CHANGE: case POLLING_DO_NOT_CHANGE:
if (get_time_diff_ms(&poll_params->poll_start_tm, &curr_tm) > PSI_WINDOW_SIZE_MS) { if (poll_params->poll_handler &&
get_time_diff_ms(&poll_params->poll_start_tm, &curr_tm) > PSI_WINDOW_SIZE_MS) {
/* Polled for the duration of PSI window, time to stop */ /* Polled for the duration of PSI window, time to stop */
poll_params->poll_handler = NULL; poll_params->poll_handler = NULL;
} }