From: Benjamin Larsson Date: Mon, 4 Apr 2016 17:55:07 +0000 (+0200) Subject: hantek-6xxx: positive return code is not an error X-Git-Tag: libsigrok-0.5.0~502 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8d6d7d5d0db6c0a778af6b2db8c144630f85311e;p=libsigrok.git hantek-6xxx: positive return code is not an error --- diff --git a/src/hardware/hantek-6xxx/protocol.c b/src/hardware/hantek-6xxx/protocol.c index 4c2b8cda..c02aa174 100644 --- a/src/hardware/hantek-6xxx/protocol.c +++ b/src/hardware/hantek-6xxx/protocol.c @@ -123,7 +123,7 @@ SR_PRIV int hantek_6xxx_get_channeldata(const struct sr_dev_inst *sdi, transfer = libusb_alloc_transfer(0); libusb_fill_bulk_transfer(transfer, usb->devhdl, HANTEK_EP_IN, buf, data_amount, cb, (void *)sdi, 4000); - if ((ret = libusb_submit_transfer(transfer)) != 0) { + if ((ret = libusb_submit_transfer(transfer)) < 0) { sr_err("Failed to submit transfer: %s.", libusb_error_name(ret)); /* TODO: Free them all. */