X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fhantek-dso%2Fdso.c;h=8561ac3ded1494474bd48564cee18cc15e734874;hb=2a8f2d41adcd0aa9e498c4eea2a5f82263039e5c;hp=195201fe7302f3e05185cb42d5b583b8d1f25aca;hpb=41812aca436805b0614f2a8f31cf2f8ce494aea0;p=libsigrok.git diff --git a/src/hardware/hantek-dso/dso.c b/src/hardware/hantek-dso/dso.c index 195201fe..8561ac3d 100644 --- a/src/hardware/hantek-dso/dso.c +++ b/src/hardware/hantek-dso/dso.c @@ -19,10 +19,11 @@ * along with this program. If not, see . */ +#include #include #include #include -#include "libsigrok.h" +#include #include "libsigrok-internal.h" #include "dso.h" @@ -75,8 +76,7 @@ static int dso_getmps(libusb_device *dev) const struct libusb_interface_descriptor *intf_dsc; int mps; - if (libusb_get_device_descriptor(dev, &des) != 0) - return 0; + libusb_get_device_descriptor(dev, &des); if (des.bNumConfigurations != 1) return 0; @@ -127,11 +127,7 @@ SR_PRIV int dso_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)