X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Flecroy-logicstudio%2Fapi.c;h=6425e0f5fcedaeb95cdbbcedb545b165dcf952fd;hb=18426d1c0e36b2b26d9dfc53eaac64b857e941c8;hp=6dd0bd0179fa7f8354567f24eb537f240fec60e9;hpb=b3fd09937ce099d5a7086ff6bbdfa1b4f371cabd;p=libsigrok.git diff --git a/src/hardware/lecroy-logicstudio/api.c b/src/hardware/lecroy-logicstudio/api.c index 6dd0bd01..6425e0f5 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 @@ -408,7 +410,7 @@ static int config_list(uint32_t key, GVariant **data, { switch (key) { case SR_CONF_DEVICE_OPTIONS: - return STD_CONFIG_LIST(key, data, sdi, cg, NULL, drvopts, devopts); + return STD_CONFIG_LIST(key, data, sdi, cg, NO_OPTS, drvopts, devopts); case SR_CONF_SAMPLERATE: *data = std_gvar_samplerates(ARRAY_AND_SIZE(samplerates)); break;