[Power] : Changes to resolve compiler warnings

Resolving compiler warnings

Change-Id: If4bde7e7b17d7ec3bd2fd57945662163e4171d82
This commit is contained in:
Divya Verma
2021-10-29 12:43:23 +05:30
committed by Gerrit - the friendly Code Review server
parent 62c0c21ae7
commit fe6e6b5169
3 changed files with 7 additions and 2 deletions

View File

@@ -101,14 +101,17 @@ void power_hint(power_hint_t hint, void *data)
handles[hint].ref_count++;
}
else
if (handles[hint].handle > 0)
if (handles[hint].handle > 0) {
if (--handles[hint].ref_count == 0) {
release_request(handles[hint].handle);
handles[hint].handle = 0;
}
}
else
ALOGE("Lock for hint: %X was not acquired, cannot be released", hint);
break;
default:
break;
}
}