]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/gmc-mh-1x-2x/api.c
sr_dev_close(): Set status to SR_ST_INACTIVE.
[libsigrok.git] / src / hardware / gmc-mh-1x-2x / api.c
index 71ab57d097a3e1e8b76ac0d4272f1f1431c74ad1..8bac10f14c7cc10e48a9f3cf580512af3646fbf8 100644 (file)
@@ -334,13 +334,11 @@ static int dev_close(struct sr_dev_inst *sdi)
 {
        struct dev_context *devc;
 
-       std_serial_dev_close(sdi);
+       devc = sdi->priv;
 
-       sdi->status = SR_ST_INACTIVE;
-       if ((devc = sdi->priv))
-               devc->model = METRAHIT_NONE;
+       devc->model = METRAHIT_NONE;
 
-       return SR_OK;
+       return std_serial_dev_close(sdi);
 }
 
 static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi,