From 1971c26df1e1aa88c1191401f4e2b0afc1b5b344 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Mon, 29 Mar 2010 12:21:52 +0200 Subject: [PATCH] Fix ftdi_set_interface: It gets 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 df25d44..5c25abd 100644 --- a/src/ftdi.c +++ b/src/ftdi.c @@ -135,7 +135,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