]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/fx2lafw/api.c
sr_dev_close(): Set status to SR_ST_INACTIVE.
[libsigrok.git] / src / hardware / fx2lafw / api.c
index 879fdf04ae1bfce2d4d05c49411657b9043e7d2d..547f7229d4169c0741879d60857f7e28d9ef994e 100644 (file)
@@ -438,14 +438,13 @@ static int dev_close(struct sr_dev_inst *sdi)
        usb = sdi->conn;
 
        if (!usb->devhdl)
-               return SR_ERR;
+               return SR_ERR_BUG;
 
        sr_info("fx2lafw: Closing device on %d.%d (logical) / %s (physical) interface %d.",
                usb->bus, usb->address, sdi->connection_id, USB_INTERFACE);
        libusb_release_interface(usb->devhdl, USB_INTERFACE);
        libusb_close(usb->devhdl);
        usb->devhdl = NULL;
-       sdi->status = SR_ST_INACTIVE;
 
        return SR_OK;
 }