Fix coverity issue 19/259919/1
authorDongkyun Son <dongkyun.s@samsung.com>
Wed, 16 Jun 2021 12:32:36 +0000 (21:32 +0900)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 16 Jun 2021 12:32:36 +0000 (21:32 +0900)
CID 1237668 (#1 of 1): Unchecked return value (CHECKED_RETURN)

Change-Id: I3732e99e1768535c1e59506008627d423b81e5f2
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
probe_event/orientation.c

index 1675f77..d7876d0 100644 (file)
@@ -196,9 +196,9 @@ static int __rotate_event_init(void)
                return -1;
        }
 
-       rotation.auto_rotate = 0;
-       vconf_get_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL,
-                      &rotation.auto_rotate);
+       if (vconf_get_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL,
+                      &rotation.auto_rotate) != 0)
+               rotation.auto_rotate = 0;
 
        if (vconf_notify_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL,
                                     __auto_rotate_screen_cb, NULL) != 0)