]> sigrok.org Git - libsigrok.git/commitdiff
hantek-6xxx: libusb_get_device_descriptor() cannot fail.
authorUwe Hermann <redacted>
Wed, 9 Mar 2016 21:41:58 +0000 (22:41 +0100)
committerUwe Hermann <redacted>
Sun, 13 Mar 2016 22:33:56 +0000 (23:33 +0100)
src/hardware/hantek-6xxx/api.c
src/hardware/hantek-6xxx/protocol.c

index caa3d0f6bb1026f5e55ec60a93bd8e9284efc0b6..b12286454fb6867b9bfb5d506d752fbf50d2cd37 100644 (file)
@@ -206,11 +206,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                                continue;
                }
 
-               if ((ret = libusb_get_device_descriptor(devlist[i], &des))) {
-                       sr_err("Failed to get device descriptor: %s.",
-                                       libusb_error_name(ret));
-                       continue;
-               }
+               libusb_get_device_descriptor(devlist[i], &des);
 
                usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
 
index 37380490a80d25bcc1c25c7c0f372d61735ec378..4c2b8cdaf76dbd817835f52572ef436b25e9bde6 100644 (file)
@@ -39,11 +39,7 @@ SR_PRIV int hantek_6xxx_open(struct sr_dev_inst *sdi)
 
        libusb_get_device_list(drvc->sr_ctx->libusb_ctx, &devlist);
        for (i = 0; devlist[i]; i++) {
-               if ((err = libusb_get_device_descriptor(devlist[i], &des))) {
-                       sr_err("Failed to get device descriptor: %s.",
-                              libusb_error_name(err));
-                       continue;
-               }
+               libusb_get_device_descriptor(devlist[i], &des);
 
                if (des.idVendor != devc->profile->fw_vid
                    || des.idProduct != devc->profile->fw_pid)