]> sigrok.org Git - libsigrok.git/commitdiff
sigma: Fix segfault when no Sigma present.
authorHåvard Espeland <redacted>
Mon, 23 Apr 2012 11:36:17 +0000 (13:36 +0200)
committerHåvard Espeland <redacted>
Mon, 23 Apr 2012 11:36:17 +0000 (13:36 +0200)
hardware/asix-sigma/asix-sigma.c

index 9e1cd09ce6e24069cc97d639cd216ebeb970b38b..1d5f1610710ab7f7a41dfd220d3e05d887451650 100644 (file)
@@ -426,7 +426,7 @@ static int hw_init(const char *devinfo)
        /* Look for SIGMAs. */
 
        if (ftdi_usb_find_all(&ctx->ftdic, &devlist,
-                       USB_VENDOR, USB_PRODUCT) < 0)
+                       USB_VENDOR, USB_PRODUCT) <= 0)
                goto free;
 
        /* Make sure it's a version 1 or 2 SIGMA. */