]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fx2lafw/api.c
Check usb_get_port_path() return value
[libsigrok.git] / src / hardware / fx2lafw / api.c
index abb867884ed0ba9ae8e10acf242487f829f45c41..647aeec04d35522c11ba2cf80bec6899629b0a82 100644 (file)
@@ -265,7 +265,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
 
                libusb_close(hdl);
 
-               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;
 
                prof = NULL;
                for (j = 0; supported_fx2[j].vid; j++) {