Fix defects detected by static analysis tool 84/174484/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 2 Apr 2018 10:01:39 +0000 (19:01 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 2 Apr 2018 10:01:39 +0000 (19:01 +0900)
Change-Id: Ia800fe14ca76dd427e3cd64d77b224c23d613ad4
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/w-input-stt-voice.cpp

index 2aac43a..815ef56 100755 (executable)
@@ -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)