Resolved Coverity issue WGID-1152960 02/256002/2 accepted/tizen/unified/20210328.230632 submit/tizen/20210326.104149
authorAmritanshu <a.pandia1@samsung.com>
Fri, 26 Mar 2021 09:21:23 +0000 (14:51 +0530)
committerAmritanshu Pandia <a.pandia1@samsung.com>
Fri, 26 Mar 2021 09:22:27 +0000 (09:22 +0000)
Change-Id: I346405d07c92eb3e3caa2e1e3191b5d87c13d8e1
Signed-off-by: Amritanshu <a.pandia1@samsung.com>
src/wearable/hw_key.c

index 55580fa..c5ce150 100755 (executable)
@@ -142,9 +142,13 @@ static Eina_Bool _long_press_timer_cb(void* data)
        process_mgr_syspopup_launch("poweroff-syspopup", NULL, NULL, NULL, NULL);
 #endif
 
-       feedback_initialize();
-       feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_HOLD);
-       feedback_deinitialize();
+       if (FEEDBACK_ERROR_NONE == feedback_initialize())
+       {
+               if (FEEDBACK_ERROR_NONE == feedback_play_type(FEEDBACK_TYPE_VIBRATION, FEEDBACK_PATTERN_HOLD))
+                       _D("Successfully set feedback_play_type");
+               feedback_deinitialize();
+       }
+
 
        return ECORE_CALLBACK_CANCEL;
 }