From: Marcel Holtmann Date: Sun, 10 Aug 2008 10:24:19 +0000 (+0200) Subject: Abort driver matching if probe succeeds X-Git-Tag: 0.1~246 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8dacf3b5cde294708c06e16a8c03b34834448e48;p=platform%2Fupstream%2Fconnman.git Abort driver matching if probe succeeds --- diff --git a/src/element.c b/src/element.c index 8996f3b..d954b63 100644 --- a/src/element.c +++ b/src/element.c @@ -746,12 +746,12 @@ static void register_element(gpointer data, gpointer user_data) DBG("driver %p name %s", driver, driver->name); - if (driver->probe(element) < 0) - continue; - - connman_element_lock(element); - element->driver = driver; - connman_element_unlock(element); + if (driver->probe(element) == 0) { + connman_element_lock(element); + element->driver = driver; + connman_element_unlock(element); + break; + } } g_static_rw_lock_writer_unlock(&element_lock);