]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/saleae-logic-pro/api.c
Check usb_get_port_path() return value
[libsigrok.git] / src / hardware / saleae-logic-pro / api.c
index a7e04548eff453cc25d113f7e8a05a4e32ab8e23..ae444dd832125bea1ff16880936f3ee5cf9b04f0 100644 (file)
@@ -240,7 +240,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                if (des.idVendor != 0x21a9 || des.idProduct != 0x1006)
                        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;
 
                sdi = g_malloc0(sizeof(struct sr_dev_inst));
                sdi->status = SR_ST_INITIALIZING;