]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/chronovu-la/api.c
uni-t-ut181a: silence compiler warning, use of uninitialized variable
[libsigrok.git] / src / hardware / chronovu-la / api.c
index 8ca68edbb66645b84946809bc7b407730a7da36b..694bd54ac84fb91f0f864cefa67d9d31eb2a641c 100644 (file)
@@ -192,10 +192,11 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                        continue;
                }
 
-               usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
-
                libusb_close(hdl);
 
+               if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0)
+                       continue;
+
                if (!strcmp(product, "ChronoVu LA8"))
                        model = 0;
                else if (!strcmp(product, "ChronoVu LA16"))