devinfo: avoid crash if query_model not supported
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Fri, 21 Oct 2011 16:51:35 +0000 (18:51 +0200)
committerDenis Kenzior <denkenz@gmail.com>
Fri, 21 Oct 2011 18:17:50 +0000 (13:17 -0500)
src/modem.c

index 52b9714..344a2a6 100644 (file)
@@ -1398,6 +1398,7 @@ static void query_model(struct ofono_devinfo *info)
        if (info->driver->query_model == NULL) {
                /* If model is not supported, don't bother querying revision */
                query_serial(info);
+               return;
        }
 
        info->driver->query_model(info, query_model_cb, info);