libusb_get_device_descriptor(devlist[i], &des);
- 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; dev_profiles[j].orig_vid; j++) {
*data = std_gvar_array_u32(ARRAY_AND_SIZE(devopts_cg));
break;
case SR_CONF_COUPLING:
+ if (!devc)
+ return SR_ERR_ARG;
*data = g_variant_new_strv(devc->coupling_vals, devc->coupling_tab_size);
break;
case SR_CONF_VDIV:
return;
}
- for (int ch = 0; ch < 2; ch++) {
+ for (int ch = 0; ch < NUM_CHANNELS; ch++) {
if (!devc->ch_enabled[ch])
continue;