]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/hantek-dso/api.c
No need to check return value of libusb_get_device_descriptor().
[libsigrok.git] / src / hardware / hantek-dso / api.c
index 90706065f4154c37ae1d228b0ecec535ceb13101..b05e644aff3b616f66a13db3fab75f2aa2d279dc 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -269,7 +270,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
        GSList *l, *devices, *conn_devices;
        struct libusb_device_descriptor des;
        libusb_device **devlist;
-       int ret, i, j;
+       int i, j;
        const char *conn;
        char connection_id[64];
 
@@ -307,11 +308,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));