Changes error handling order 10/86010/1
authorseungha.son <seungha.son@samsung.com>
Tue, 30 Aug 2016 06:32:08 +0000 (15:32 +0900)
committerseungha.son <seungha.son@samsung.com>
Tue, 30 Aug 2016 06:33:23 +0000 (15:33 +0900)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I9a5c518caf4077b44fc09a2bee6c04dfce6ec33a

lib/src/shortcut_manager.c

index 6c43266..9e580fb 100755 (executable)
@@ -452,6 +452,9 @@ EAPI int shortcut_set_request_cb(shortcut_request_cb request_cb, void *data)
 {
        int ret = _dbus_init();
 
+       if (request_cb == NULL)
+               return SHORTCUT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
+
        if (ret != SHORTCUT_ERROR_NONE) {
                /* LCOV_EXCL_START */
                ErrPrint("Can't init dbus %d", ret);
@@ -475,9 +478,6 @@ EAPI int shortcut_set_request_cb(shortcut_request_cb request_cb, void *data)
                /* LCOV_EXCL_STOP */
        }
 
-       if (request_cb == NULL)
-               return SHORTCUT_ERROR_INVALID_PARAMETER; /* LCOV_EXCL_LINE */
-
        if (provider_monitor_id == 0) {
                provider_monitor_id = g_bus_watch_name_on_connection(
                                _gdbus_conn,