return sdi;
fail:
- if (hw_info)
- sr_scpi_hw_info_free(hw_info);
+ sr_scpi_hw_info_free(hw_info);
sr_dev_inst_free(sdi);
g_free(devc);
static int dev_close(struct sr_dev_inst *sdi)
{
- if (sdi->status == SR_ST_INACTIVE)
- return SR_OK;
-
sr_scpi_close(sdi->conn);
sdi->status = SR_ST_INACTIVE;
struct dev_context *devc = NULL;
const struct scope_config *model = NULL;
- /* SR_CONF_SCAN_OPTIONS is always valid, regardless of sdi or probe group. */
+ /* SR_CONF_SCAN_OPTIONS is always valid, regardless of sdi or channel group. */
if (key == SR_CONF_SCAN_OPTIONS) {
*data = g_variant_new_fixed_array(G_VARIANT_TYPE_UINT32,
dlm_scanopts, ARRAY_SIZE(dlm_scanopts), sizeof(uint32_t));
/*
* If cg is NULL, only the SR_CONF_DEVICE_OPTIONS that are not
- * specific to a probe group must be returned.
+ * specific to a channel group must be returned.
*/
if (!cg) {
switch (key) {
struct dev_context *devc;
struct sr_scpi_dev_inst *scpi;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
scpi = sdi->conn;
devc = sdi->priv;
digital_added = FALSE;
std_session_send_df_end(sdi);
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
devc->num_frames = 0;