device: Do not return error for unhandled devices
authordaniel.wagner@bmw-carit.de <daniel.wagner@bmw-carit.de>
Mon, 20 Jun 2011 17:17:08 +0000 (19:17 +0200)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 21 Jun 2011 08:51:01 +0000 (10:51 +0200)
If device_probe returns an error for a device where no
driver has been registered, the device will be destroyed.
This happens when for example the wpa_supplicant is
started after ConnMan. In this case we don't have any
wifi device registered at the core when wpa_supplicant starts.

src/device.c

index 067c794..3e3e96d 100644 (file)
@@ -1199,7 +1199,7 @@ static int device_probe(struct connman_device *device)
        }
 
        if (device->driver == NULL)
-               return -ENODEV;
+               return 0;
 
        return setup_device(device);
 }