From 77417a5e5261a2ab1e2deb0c7f892d4007bb1cd1 Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Thu, 29 Jun 2023 15:04:32 +0900 Subject: [PATCH] display: Fix static analysis issue Fix logical error code Change-Id: I8fe1338ac833385577ea8e515745d8a44c226b63 Signed-off-by: Yunhee Seo --- src/display/display-lock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display/display-lock.c b/src/display/display-lock.c index 2b2625f..1f32883 100644 --- a/src/display/display-lock.c +++ b/src/display/display-lock.c @@ -377,7 +377,7 @@ int display_lock_request_lock(enum state_t state, pid_t pid, unsigned int timeou { struct display_lock *dl; - if (state < S_NORMAL || state > S_LCDOFF || timeout < 0) + if (state < S_NORMAL || state > S_LCDOFF) return -EINVAL; dl = find_lock(state, pid); @@ -408,7 +408,7 @@ int display_lock_update_lock(enum state_t state, pid_t pid, unsigned int timeout { struct display_lock *dl; - if (state < S_NORMAL || state > S_LCDOFF || timeout < 0) + if (state < S_NORMAL || state > S_LCDOFF) return -EINVAL; dl = find_lock(state, pid); -- 2.7.4