Don't initialize error variable
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 2 Sep 2009 01:19:26 +0000 (18:19 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 2 Sep 2009 01:19:26 +0000 (18:19 -0700)
plugins/bluetooth.c

index 69a5ebb..f123f78 100644 (file)
@@ -807,15 +807,17 @@ static const char *adapter_rule = "type=signal,member=" PROPERTY_CHANGED
 
 static int bluetooth_init(void)
 {
-       int err = -EIO;
+       int err;
 
        connection = connman_dbus_get_connection();
        if (connection == NULL)
                return -EIO;
 
        if (dbus_connection_add_filter(connection, bluetooth_signal,
-                                                       NULL, NULL) == FALSE)
+                                               NULL, NULL) == FALSE) {
+               err = -EIO;
                goto unref;
+       }
 
        err = connman_network_driver_register(&pan_driver);
        if (err < 0)