sm8250-common: power: Fix warnings
This commit is contained in:
parent
e032e7cc78
commit
0e782407a5
3 changed files with 9 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#define LOG_TAG "QTI PowerHAL"
|
||||
|
||||
#include <cutils/log.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
@ -34,7 +36,6 @@
|
|||
#include <libxml/tree.h>
|
||||
#include <unistd.h>
|
||||
#include "powerhintparser.h"
|
||||
#define LOG_TAG "QTI PowerHAL"
|
||||
|
||||
int parsePowerhintXML() {
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ void interaction(int duration, int num_args, int opt_list[])
|
|||
#ifdef INTERACTION_BOOST
|
||||
static int lock_handle = 0;
|
||||
|
||||
if (duration < 0 || num_args < 1 || opt_list[0] == NULL)
|
||||
if (duration < 0 || num_args < 1 || opt_list[0] == 0)
|
||||
return;
|
||||
|
||||
if (qcopt_handle) {
|
||||
|
@ -230,7 +230,7 @@ void interaction(int duration, int num_args, int opt_list[])
|
|||
|
||||
int interaction_with_handle(int lock_handle, int duration, int num_args, int opt_list[])
|
||||
{
|
||||
if (duration < 0 || num_args < 1 || opt_list[0] == NULL)
|
||||
if (duration < 0 || num_args < 1 || opt_list[0] == 0)
|
||||
return 0;
|
||||
|
||||
if (qcopt_handle) {
|
||||
|
|
Loading…
Reference in a new issue