]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/testo/api.c
Check usb_get_port_path() return value
[libsigrok.git] / src / hardware / testo / api.c
index 90fb65ca4bed4a11f0c3296d766ca57a4f3947c2..43a5f2513f67ca4822356fa00e74e5b52fd5e150 100644 (file)
@@ -109,7 +109,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                if (strncmp(manufacturer, "testo", 5))
                        continue;
 
-               usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
+               if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0)
+                       continue;
 
                /* Hardcode the 435 for now. */
                if (strcmp(product, "testo 435/635/735"))