X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ffx2lafw%2Fapi.c;h=547f7229d4169c0741879d60857f7e28d9ef994e;hb=f1ba6b4b2c9a8ecf90bb31efb218752aa7e49d1a;hp=6c7d776f8e9109c2bb1a5b3b11e044d8cee47978;hpb=b0acb693f94d920887684eb9fdae77e036965975;p=libsigrok.git diff --git a/src/hardware/fx2lafw/api.c b/src/hardware/fx2lafw/api.c index 6c7d776f..547f7229 100644 --- a/src/hardware/fx2lafw/api.c +++ b/src/hardware/fx2lafw/api.c @@ -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; } @@ -504,9 +503,6 @@ static int config_set(uint32_t key, GVariant *data, if (!sdi) return SR_ERR_ARG; - if (sdi->status != SR_ST_ACTIVE) - return SR_ERR; - devc = sdi->priv; ret = SR_OK;