X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-4032l%2Fapi.c;h=67dc968dcaea91c423ceb0382607982ffa0f1154;hb=2cff7a2ba7d516db7f1f0c376bddd2852abfc52c;hp=626175f07873dd5daa99a23ca881edb72f21c262;hpb=4868f15a86168969de4e3c68544e88502e0e8fb7;p=libsigrok.git diff --git a/src/hardware/hantek-4032l/api.c b/src/hardware/hantek-4032l/api.c index 626175f0..67dc968d 100644 --- a/src/hardware/hantek-4032l/api.c +++ b/src/hardware/hantek-4032l/api.c @@ -180,7 +180,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) des.idProduct != H4032L_USB_PRODUCT) continue; - usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)); + if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0) + continue; sdi = g_malloc0(sizeof(struct sr_dev_inst)); sdi->driver = &hantek_4032l_driver_info;