return -ENOENT;
}
- ret = pass_gdbus_get_name(PASS_DBUS_THERMAL,
- DBUS_THERMAL_BUS_NAME, NULL);
- if (ret < 0) {
- _E("Failed to own dbus name '%s'\n", DBUS_THERMAL_BUS_NAME);
- ret = -EINVAL;
- goto out;
- }
-
/* Initialize the d-bus interface for Thermal Monitor */
g_gdbus_instance = pass_gdbus_get_instance_thermal();
if (!g_gdbus_instance) {
goto out;
}
+ ret = pass_gdbus_get_name(PASS_DBUS_THERMAL,
+ DBUS_THERMAL_BUS_NAME, NULL);
+ if (ret < 0) {
+ _E("Failed to own dbus name '%s'\n", DBUS_THERMAL_BUS_NAME);
+ ret = -EINVAL;
+ goto out;
+ }
+
ret = pass_gdbus_connect_signal(g_gdbus_instance,
ARRAY_SIZE(g_gdbus_signal_infos), g_gdbus_signal_infos);
if (ret < 0) {