]> sigrok.org Git - libsigrok.git/commitdiff
chronovu-la8: not a bug if an unused driver gets asked to clean up
authorBert Vermeulen <redacted>
Tue, 6 Nov 2012 23:39:46 +0000 (00:39 +0100)
committerBert Vermeulen <redacted>
Tue, 6 Nov 2012 23:39:46 +0000 (00:39 +0100)
hardware/chronovu-la8/api.c

index 75f085c6bf646115fa30c7dab27c1c83284ccc66..5fab2f1abbdf342d496c2740a28af956435be54e 100644 (file)
@@ -278,10 +278,9 @@ static int hw_dev_close(struct sr_dev_inst *sdi)
 
 static int hw_cleanup(void)
 {
-       if (!di->priv) {
-               sr_err("%s: di->priv was NULL.", __func__);
-               return SR_ERR_BUG;
-       }
+       if (!di->priv)
+               /* Can get called on an unused driver, doesn't matter. */
+               return SR_OK;
 
        clear_instances();