X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Ffx2lafw%2Fprotocol.c;h=12fc9e2c061166405b494ad813c6c704d146d1fe;hb=fc6cbfce2ba3f7f15f79acd6754ec6745e091ae6;hp=c87f659d07e249a28bfc5a771bf324eeb592934c;hpb=41812aca436805b0614f2a8f31cf2f8ce494aea0;p=libsigrok.git diff --git a/src/hardware/fx2lafw/protocol.c b/src/hardware/fx2lafw/protocol.c index c87f659d..12fc9e2c 100644 --- a/src/hardware/fx2lafw/protocol.c +++ b/src/hardware/fx2lafw/protocol.c @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +#include #include #include #include "protocol.h" @@ -156,8 +157,7 @@ SR_PRIV gboolean match_manuf_prod(libusb_device *dev, const char *manufacturer, ret = FALSE; while (!ret) { /* Assume the FW has not been loaded, unless proven wrong. */ - if (libusb_get_device_descriptor(dev, &des) != 0) - break; + libusb_get_device_descriptor(dev, &des); if (libusb_open(dev, &hdl) != 0) break; @@ -210,11 +210,7 @@ SR_PRIV int fx2lafw_dev_open(struct sr_dev_inst *sdi, struct sr_dev_driver *di) } for (i = 0; i < device_count; i++) { - 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); if (des.idVendor != devc->profile->vid || des.idProduct != devc->profile->pid)