]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hung-chang-dso-2100/api.c
sr_config_commit(): Factor out SR_ERR_DEV_CLOSED check.
[libsigrok.git] / src / hardware / hung-chang-dso-2100 / api.c
index 70b094a605e023b0fa71ef8ac063f9f881a1a992..652b3cb3ac4d25418f300b68fccae91244240777 100644 (file)
@@ -434,9 +434,6 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd
        if (cg) /* sr_config_set will validate cg using config_list */
                ch = ((struct sr_channel *)cg->channels->data)->index;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        ret = SR_OK;
        switch (key) {
        case SR_CONF_LIMIT_FRAMES:
@@ -549,9 +546,6 @@ static int config_commit(const struct sr_dev_inst *sdi)
        uint8_t state = hung_chang_dso_2100_read_mbox(sdi->conn, 0.02);
        int ret;
 
-       if (sdi->status != SR_ST_ACTIVE)
-               return SR_ERR_DEV_CLOSED;
-
        switch (state) {
        case 0x03:
        case 0x14: