From 464d49360a02c6b378ebaf5ef38f4bb4536dd5ee Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Mon, 27 Jan 2014 21:19:41 +0100 Subject: [PATCH] rigol-ds: Deal with dev_close() getting called multiple times. --- hardware/rigol-ds/api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index 76c2efc7..f61d58ca 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -482,6 +482,9 @@ static int dev_close(struct sr_dev_inst *sdi) struct sr_scpi_dev_inst *scpi; struct dev_context *devc; + if (sdi->status != SR_ST_INACTIVE) + return SR_OK; + scpi = sdi->conn; devc = sdi->priv;