From acfc4c6c2fb66e8142df8ed69aa8c6374abc871a Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Fri, 30 Nov 2012 16:46:45 +0000 Subject: Fix sp_openserport users on Windows Corresponding to flashrom svn r1627. Signed-off-by: Stefan Tauner Acked-by: Idwer Vollering --- pony_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pony_spi.c') diff --git a/pony_spi.c b/pony_spi.c index 7875200..101751f 100644 --- a/pony_spi.c +++ b/pony_spi.c @@ -116,7 +116,7 @@ int pony_spi_init(void) arg = extract_programmer_param("dev"); if (arg && strlen(arg)) { sp_fd = sp_openserport(arg, 9600); - if (sp_fd < 0) { + if (sp_fd == SER_INV_FD) { free(arg); return 1; } -- cgit v1.1