From: HÃ¥vard Espeland Date: Mon, 23 Apr 2012 11:36:17 +0000 (+0200) Subject: sigma: Fix segfault when no Sigma present. X-Git-Tag: libsigrok-0.1.1~33 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=42cdeef6268a2fa28a42e472324c5122410847d0;p=libsigrok.git sigma: Fix segfault when no Sigma present. --- diff --git a/hardware/asix-sigma/asix-sigma.c b/hardware/asix-sigma/asix-sigma.c index 9e1cd09c..1d5f1610 100644 --- a/hardware/asix-sigma/asix-sigma.c +++ b/hardware/asix-sigma/asix-sigma.c @@ -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. */