From 523bcf82fbc6d051b41f247ff4b5e00ac74ce42a Mon Sep 17 00:00:00 2001 From: Yunhee Seo Date: Thu, 26 Jan 2023 19:50:04 +0900 Subject: [PATCH] plugin: iot-headless: display: add handling code to return check Add handling code to resolve issue reported by static analysis. Change-Id: I761e84429ad3372a029a7daedd2ef430a1472c23 Signed-off-by: Yunhee Seo --- plugins/iot-headless/display/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/iot-headless/display/core.c b/plugins/iot-headless/display/core.c index 9db1fdd..ac7bd11 100644 --- a/plugins/iot-headless/display/core.c +++ b/plugins/iot-headless/display/core.c @@ -20,6 +20,8 @@ #include #include +#include "core/log.h" + static GVariant *dbus_lockstate(GDBusConnection *conn, const gchar *sender, const gchar *path, const gchar *iface, const gchar *name, GVariant *param, GDBusMethodInvocation *invocation, gpointer user_data) @@ -48,7 +50,11 @@ static const dbus_interface_u dbus_interface = { static void display_init(void *data) { - gdbus_add_object(NULL, DEVICED_PATH_DISPLAY, &dbus_interface); + int ret = 0; + + ret = gdbus_add_object(NULL, DEVICED_PATH_DISPLAY, &dbus_interface); + if (ret < 0) + _W("Failed to init plugin iot-headless display dbus interface(%d)", ret); } static const struct device_ops display_device_ops = { -- 2.7.4