scpi: Don't return NULL device from unsuccessful scan.

This commit is contained in:
Bert Vermeulen 2014-09-09 19:53:55 +02:00
parent bfc8679937
commit cfd8ec53ab
1 changed files with 2 additions and 1 deletions

View File

@ -157,7 +157,8 @@ SR_PRIV GSList *sr_scpi_scan(struct drv_context *drvc, GSList *options,
if (!devices && resource) { if (!devices && resource) {
sdi = sr_scpi_scan_resource(drvc, resource, serialcomm, probe_device); sdi = sr_scpi_scan_resource(drvc, resource, serialcomm, probe_device);
devices = g_slist_append(NULL, sdi); if (sdi)
devices = g_slist_append(NULL, sdi);
} }
/* Tack a copy of the newly found devices onto the driver list. */ /* Tack a copy of the newly found devices onto the driver list. */