From: Bartosz Golaszewski Date: Tue, 17 Feb 2015 17:27:04 +0000 (+0100) Subject: baylibre-acme: don't report ACME as detected if no probes are present X-Git-Tag: libsigrok-0.4.0~622 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=380ee96fdfe0895ca0aa0b158d5c332ef08f8b3c;p=libsigrok.git baylibre-acme: don't report ACME as detected if no probes are present Signed-off-by: Bartosz Golaszewski --- diff --git a/src/hardware/baylibre-acme/api.c b/src/hardware/baylibre-acme/api.c index fc9706f0..0aae8c94 100644 --- a/src/hardware/baylibre-acme/api.c +++ b/src/hardware/baylibre-acme/api.c @@ -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);