]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/lascar-el-usb/api.c
sr_dev_close(): Set status to SR_ST_INACTIVE.
[libsigrok.git] / src / hardware / lascar-el-usb / api.c
index 7c7eda9e68858847825a96fbad6728fd9f91a093..9801732a8e70ce1211757abf7030dc9eb029f6f8 100644 (file)
@@ -108,13 +108,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, LASCAR_INTERFACE);
        libusb_close(usb->devhdl);
        usb->devhdl = NULL;
-       sdi->status = SR_ST_INACTIVE;
 
        return SR_OK;
 }