X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fbeaglelogic%2Fapi.c;h=0d022f2b336967e0aea956071d21ca92589c55eb;hp=09fcf0bdb5577459d49b2f7602b8ba03aaa0ff51;hb=093e1cba6b7bf14cfb77fa36f59b0c16e6fca7cc;hpb=89ab9fc39c015d541b2fdd4d9d2fb5e00f63be8a diff --git a/src/hardware/beaglelogic/api.c b/src/hardware/beaglelogic/api.c index 09fcf0bd..0d022f2b 100644 --- a/src/hardware/beaglelogic/api.c +++ b/src/hardware/beaglelogic/api.c @@ -166,12 +166,12 @@ static int dev_close(struct sr_dev_inst *sdi) { struct dev_context *devc = sdi->priv; - if (sdi->status == SR_ST_ACTIVE) { - /* Close the memory mapping and the file */ - beaglelogic_munmap(devc); - beaglelogic_close(devc); - } + /* Close the memory mapping and the file */ + beaglelogic_munmap(devc); + beaglelogic_close(devc); + sdi->status = SR_ST_INACTIVE; + return SR_OK; }