From 68560991cffc25a11f7b1efa2e4491e55d0e18aa Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 2 Apr 2018 19:01:39 +0900 Subject: [PATCH] Fix defects detected by static analysis tool Change-Id: Ia800fe14ca76dd427e3cd64d77b224c23d613ad4 Signed-off-by: Jihoon Kim --- src/w-input-stt-voice.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/w-input-stt-voice.cpp b/src/w-input-stt-voice.cpp index 2aac43a..815ef56 100755 --- a/src/w-input-stt-voice.cpp +++ b/src/w-input-stt-voice.cpp @@ -566,7 +566,10 @@ static Eina_Bool _power_delayed_unlock(void *data){ PRINTFUNC(DLOG_DEBUG, "POWER Unlock"); VoiceData *voicedata = (VoiceData *) data; - device_power_release_lock(POWER_LOCK_DISPLAY); + int ret = device_power_release_lock(POWER_LOCK_DISPLAY); + if (ret != DEVICE_ERROR_NONE) + LOGW("Failed to release power(Display) (%d)", ret); + voicedata->power_unlock_timer = NULL; return ECORE_CALLBACK_CANCEL; @@ -575,7 +578,9 @@ static Eina_Bool _power_delayed_unlock(void *data){ void powerUnlock() { PRINTFUNC(DLOG_DEBUG, "POWER Unlock directly."); - device_power_release_lock(POWER_LOCK_DISPLAY); + int ret = device_power_release_lock(POWER_LOCK_DISPLAY); + if (ret != DEVICE_ERROR_NONE) + LOGW("Failed to release power(Display) (%d)", ret); } void powerLock(void *data, bool enable) -- 2.7.4