/* This delay appears to be necessary for reliable operation. */
g_usleep(30 * 1000);
+ sdi->status = SR_ST_ACTIVE;
+
devc->active_fpga_config = FPGA_NOCONF;
devc->short_transfer_quirk = FALSE;
devc->state = STATE_IDLE;
break;
/* Rinse and repeat. */
+ sdi->status = SR_ST_INACTIVE;
sr_usb_close(usb);
}
sr_usb_close(usb);
- return SR_OK;
+ return ret;
}
/* Check whether the device options contain a specific key.
(devc) ? devc->model->num_devopts : 0);
}
+ if (!devc)
+ return SR_ERR_ARG;
if (!has_devopt(devc->model, key | SR_CONF_LIST))
return SR_ERR_NA;