devc = sdi->priv;
usb = sdi->conn;
- if (sdi->status == SR_ST_INACTIVE) {
- sr_dbg("Device already closed.");
- return SR_OK;
- }
if (devc->acquisition) {
sr_err("Cannot close device during acquisition!");
/* Request stop, leak handle, and prepare for the worst. */
devc = sdi->priv;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
if (devc->acquisition) {
sr_err("Acquisition still in progress?");
return SR_ERR;