]> sigrok.org Git - libsigrok.git/blobdiff - hardware/hantek-dso/api.c
sr_driver_scan(): Improve checks.
[libsigrok.git] / hardware / hantek-dso / api.c
index 7c2eaa954f00471e223dfac021be341f22468d90..acb6d815b786446d629f0fb90825cbf3a6169537 100644 (file)
@@ -285,11 +285,12 @@ static GSList *hw_scan(GSList *options)
 
        (void)options;
 
-       devcnt = 0;
-       devices = 0;
        drvc = di->priv;
        drvc->instances = NULL;
 
+       devcnt = 0;
+       devices = 0;
+
        clear_instances();
 
        /* Find all Hantek DSO devices and upload firmware to all of them. */