X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-logicstudio%2Fapi.c;h=e75b5b09e97bc5a1d7090b9b6b9e484a87aba125;hb=6c1a76d1263403f908ac31271a4fd01792488545;hp=6dd0bd0179fa7f8354567f24eb537f240fec60e9;hpb=7bbe5a2b6a3cea7bc5b59ca3c34ed4f6fcf8c3b1;p=libsigrok.git diff --git a/src/hardware/lecroy-logicstudio/api.c b/src/hardware/lecroy-logicstudio/api.c index 6dd0bd01..e75b5b09 100644 --- a/src/hardware/lecroy-logicstudio/api.c +++ b/src/hardware/lecroy-logicstudio/api.c @@ -134,7 +134,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) if (des.idVendor != LOGICSTUDIO16_VID) 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; usb = NULL; @@ -210,7 +211,8 @@ static int open_device(struct sr_dev_inst *sdi) des.idProduct != LOGICSTUDIO16_PID_HAVE_FIRMWARE) 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; /* * Check if this device is the same one that we associated