summaryrefslogtreecommitdiff
path: root/src/technology.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2013-01-28 17:44:33 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-01-30 10:27:39 +0200
commit7b3635c3f293a625e57bc0a3c6f54fdabcd0748e (patch)
treef0637b71263418f7961996361c9f67884a6bec06 /src/technology.c
parent23f142c6534138fa9f5911c7d1069864c5ea6b19 (diff)
downloadconnman-7b3635c3f293a625e57bc0a3c6f54fdabcd0748e.tar.gz
connman-7b3635c3f293a625e57bc0a3c6f54fdabcd0748e.tar.bz2
connman-7b3635c3f293a625e57bc0a3c6f54fdabcd0748e.zip
technology: Check technology driver probe function before calling
Diffstat (limited to 'src/technology.c')
-rw-r--r--src/technology.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/technology.c b/src/technology.c
index 7f2303c4..bc02bec9 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -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);