]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/rohde-schwarz-sme-0x/api.c
sr_dev_open(): Set status to SR_ST_ACTIVE upon success.
[libsigrok.git] / src / hardware / rohde-schwarz-sme-0x / api.c
index 95a6d01d6e6999ee2bd5ccd1fc7376f31de5c85e..3ca5441ad2fb2ad6d91e2f500a47220033f23171 100644 (file)
@@ -162,19 +162,11 @@ static int dev_clear(const struct sr_dev_driver *di)
 
 static int dev_open(struct sr_dev_inst *sdi)
 {
-       if ((sdi->status != SR_ST_ACTIVE) && (sr_scpi_open(sdi->conn) != SR_OK))
-               return SR_ERR;
-
-       sdi->status = SR_ST_ACTIVE;
-
-       return SR_OK;
+       return sr_scpi_open(sdi->conn);
 }
 
 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;