rigol-ds: properly deal with dev_close() getting called multiple times
This commit is contained in:
parent
b84b7ee73d
commit
83dbd9f09c
|
@ -482,8 +482,8 @@ static int dev_close(struct sr_dev_inst *sdi)
|
||||||
struct sr_scpi_dev_inst *scpi;
|
struct sr_scpi_dev_inst *scpi;
|
||||||
struct dev_context *devc;
|
struct dev_context *devc;
|
||||||
|
|
||||||
if (sdi->status != SR_ST_INACTIVE)
|
if (sdi->status != SR_ST_ACTIVE)
|
||||||
return SR_OK;
|
return SR_ERR_DEV_CLOSED;
|
||||||
|
|
||||||
scpi = sdi->conn;
|
scpi = sdi->conn;
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
|
|
Loading…
Reference in New Issue