sm8250-common: power: Fix warnings

This commit is contained in:
LuK1337
2020-06-23 14:47:37 +02:00
parent e032e7cc78
commit 0e782407a5
3 changed files with 9 additions and 5 deletions

View File

@@ -101,13 +101,16 @@ 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
} else {
ALOGE("Lock for hint: %X was not acquired, cannot be released", hint);
}
break;
default:
break;
}
}