]> sigrok.org Git - libsigrok.git/commitdiff
hantek-6xxx: positive return code is not an error
authorBenjamin Larsson <redacted>
Mon, 4 Apr 2016 17:55:07 +0000 (19:55 +0200)
committerUwe Hermann <redacted>
Sat, 23 Apr 2016 15:37:45 +0000 (17:37 +0200)
src/hardware/hantek-6xxx/protocol.c

index 4c2b8cdaf76dbd817835f52572ef436b25e9bde6..c02aa174647bb8168f1cc5f7e41f8dfacd6a0005 100644 (file)
@@ -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. */