]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/victor-dmm/api.c
sr_dev_close(): Set status to SR_ST_INACTIVE.
[libsigrok.git] / src / hardware / victor-dmm / api.c
index 0b96a5d298d644507f85962577f2eabec956e5e7..66eff890a107ea39b3e76070e54abae070a7b3aa 100644 (file)
@@ -120,7 +120,6 @@ static int dev_open(struct sr_dev_inst *sdi)
                sr_err("Failed to claim interface: %s.", libusb_error_name(ret));
                return SR_ERR;
        }
-       sdi->status = SR_ST_ACTIVE;
 
        return SR_OK;
 }
@@ -132,13 +131,11 @@ 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;
 
        libusb_release_interface(usb->devhdl, VICTOR_INTERFACE);
        libusb_close(usb->devhdl);
        usb->devhdl = NULL;
-       sdi->status = SR_ST_INACTIVE;
 
        return SR_OK;
 }