Tethering/Upstream: technology: Return error if no devices can be found for a technology 32/11432/1
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Mon, 22 Jul 2013 10:33:06 +0000 (13:33 +0300)
committerZhang zhengguang <zhengguang.zhang@intel.com>
Mon, 28 Oct 2013 05:04:59 +0000 (13:04 +0800)
Instead of returning 0 (Success) when there are no devices for a given
technology, return ENXIO so that caller can inform user about the
issue.

Upstream commit Id: ad79c1acbd86cf64fbc0b864aefcd537bbebabf8

Change-Id: I5b6e869cf543a7be06411b90069de759a2386ad8

src/technology.c

index f217fe2..8bbd327 100644 (file)
@@ -707,7 +707,7 @@ static int technology_affect_devices(struct connman_technology *technology,
                                                connman_bool_t enable_device)
 {
        GSList *list;
-       int err = 0;
+       int err = -ENXIO;
 
        for (list = technology->device_list; list; list = list->next) {
                struct connman_device *device = list->data;