struct ftdi_device_list *devlist;
char serial_txt[10];
uint32_t serial;
+ int ret;
(void)options;
devices = NULL;
/* Look for SIGMAs. */
- if (ftdi_usb_find_all(&ctx->ftdic, &devlist,
- USB_VENDOR, USB_PRODUCT) <= 0)
+ if ((ret = ftdi_usb_find_all(&ctx->ftdic, &devlist,
+ USB_VENDOR, USB_PRODUCT)) <= 0) {
+ if (ret < 0)
+ sr_err("ftdi_usb_find_all(): %d", ret);
goto free;
+ }
/* Make sure it's a version 1 or 2 SIGMA. */
ftdi_usb_get_strings(&ctx->ftdic, devlist->dev, NULL, 0, NULL, 0,
return devices;
free:
- ftdi_free(&ctx->ftdic);
+ ftdi_deinit(&ctx->ftdic);
g_free(ctx);
return NULL;
}