technology: Check technology driver probe function before calling
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 28 Jan 2013 15:44:33 +0000 (17:44 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 30 Jan 2013 08:27:39 +0000 (10:27 +0200)
src/technology.c

index 7f2303c4c01a78607abfefcd5cc147438c8a532c..bc02bec93d6c0722a16ff3669d30f5602a6d21a5 100644 (file)
@@ -1002,7 +1002,11 @@ static struct connman_technology *technology_get(enum connman_service_type type)
        technology_list = g_slist_prepend(technology_list, technology);
 
        technology->driver = driver;
-       err = driver->probe(technology);
+       if (driver->probe != NULL)
+               err = driver->probe(technology);
+       else
+               err = 0;
+
        if (err != 0)
                DBG("Driver probe failed for technology %p", technology);