Commit daef45bd authored by Thomas Haller's avatar Thomas Haller

bluez: no need to check for valid GError if glib function fails

Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
parent c3e644fb
......@@ -305,8 +305,7 @@ on_adapter_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
priv->adapter = g_dbus_proxy_new_for_bus_finish (res, &error);
if (!priv->adapter) {
nm_log_warn (LOGD_BT, "failed to acquire adapter proxy: %s.",
error && error->message ? error->message : "(unknown)");
nm_log_warn (LOGD_BT, "failed to acquire adapter proxy: %s.", error->message);
g_clear_error (&error);
return;
}
......@@ -431,8 +430,7 @@ on_proxy_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
priv->proxy5 = g_dbus_proxy_new_for_bus_finish (res, &error);
if (!priv->proxy5) {
nm_log_warn (LOGD_BT, "failed to acquire device proxy: %s.",
error && error->message ? error->message : "(unknown)");
nm_log_warn (LOGD_BT, "failed to acquire device proxy: %s.", error->message);
g_clear_error (&error);
g_signal_emit (self, signals[INITIALIZED], 0, FALSE);
return;
......@@ -453,8 +451,7 @@ on_bus_acquired (GObject *object, GAsyncResult *res, NMBluezDevice *self)
priv->dbus_connection = g_bus_get_finish (res, &error);
if (!priv->dbus_connection) {
nm_log_warn (LOGD_BT, "failed to acquire bus connection: %s.",
error && error->message ? error->message : "(unknown)");
nm_log_warn (LOGD_BT, "failed to acquire bus connection: %s.", error->message);
g_clear_error (&error);
g_signal_emit (self, signals[INITIALIZED], 0, FALSE);
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment