From 6b11b482449214d82584185c0b80daadac46c32b Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 29 Mar 2010 12:18:10 +0200 Subject: [PATCH] Fix ftdi_set_interface: It get's called before ftdi_usb_open(). Thanks to Marcus Krellig for pointing it out. --- src/ftdi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/ftdi.c b/src/ftdi.c index 6db70f1..ac56d08 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -163,7 +163,7 @@ struct ftdi_context *ftdi_new(void) */ int ftdi_set_interface(struct ftdi_context *ftdi, enum ftdi_interface interface) { - if (ftdi == NULL || ftdi->usb_dev == NULL) + if (ftdi == NULL) ftdi_error_return(-2, "USB device unavailable"); switch (interface) -- 1.7.1