plugin: iot-headless: input: add handling code to return check
authorYunhee Seo <yuni.seo@samsung.com>
Thu, 26 Jan 2023 11:03:28 +0000 (20:03 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 27 Jan 2023 03:30:39 +0000 (12:30 +0900)
Add handling code to resolve issue reported by static analysis.

Change-Id: Ice9db999cfbd4de35de504dd773fa782a61eca51
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
(cherry picked from commit 80525ca8953ae0258e4e1fafa7af56d64b91b65a)

plugins/iot-headless/input/input-dbus.c

index c166a82..8b72583 100644 (file)
@@ -4,6 +4,7 @@
 
 #include "shared/common.h"
 #include "input-handler.h"
+#include "core/log.h"
 
 static GVariant *dbus_emulate_key(GDBusConnection *conn,
        const gchar *sender, const gchar *path, const gchar *iface, const gchar *name,
@@ -31,5 +32,9 @@ static const dbus_interface_u dbus_interface = {
 
 void init_input_dbus(void)
 {
-       gdbus_add_object(NULL, DEVICED_PATH_INPUT, &dbus_interface);
+       int ret;
+
+       ret = gdbus_add_object(NULL, DEVICED_PATH_INPUT, &dbus_interface);
+       if (ret < 0)
+               _W("Failed to init plugin iot-headless input dbus interface(%d)", ret);
 }