]> sigrok.org Git - libsigrok.git/commitdiff
baylibre-acme: don't report ACME as detected if no probes are present
authorBartosz Golaszewski <redacted>
Tue, 17 Feb 2015 17:27:04 +0000 (18:27 +0100)
committerUwe Hermann <redacted>
Fri, 20 Feb 2015 10:22:26 +0000 (11:22 +0100)
Signed-off-by: Bartosz Golaszewski <redacted>
src/hardware/baylibre-acme/api.c

index fc9706f0a718af169577b0fbe2a28471de872863..0aae8c94b26e741f16966fb87fc9e484bd7be401 100644 (file)
@@ -109,6 +109,13 @@ static GSList *scan(GSList *options)
                }
        }
 
+       /*
+        * Let's assume there's no ACME device present if no probe
+        * has been registered.
+        */
+       if (sdi->channel_groups == NULL)
+               goto err_out;
+
        devices = g_slist_append(devices, sdi);
        drvc->instances = g_slist_append(drvc->instances, sdi);