sr_err("Failed to claim interface: %s.", libusb_error_name(ret));
return SR_ERR;
}
- sdi->status = SR_ST_ACTIVE;
- return ret;
+ return SR_OK;
}
static int dev_close(struct sr_dev_inst *sdi)
usb = sdi->conn;
if (!usb->devhdl)
- /* Nothing to do. */
- return SR_OK;
+ return SR_ERR_BUG;
/* This allows a frontend to configure the device without ever
* doing an acquisition step. */
libusb_release_interface(usb->devhdl, USB_INTERFACE);
libusb_close(usb->devhdl);
usb->devhdl = NULL;
- sdi->status = SR_ST_INACTIVE;
return SR_OK;
}