From a9e1e819c1620651967caa736d44e635b83ef0c1 Mon Sep 17 00:00:00 2001 From: hweisbach Date: Mon, 6 May 2013 12:05:27 +0000 Subject: [PATCH] avrftdi.c: Fail on wrong pin configuration also change error return value of set_pin from 1 to -1. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1165 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrftdi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/avrftdi.c b/avrftdi.c index 7e2ca68a..29177662 100644 --- a/avrftdi.c +++ b/avrftdi.c @@ -230,7 +230,7 @@ static int set_pin(PROGRAMMER * pgm, int pinfunc, int value) avrftdi_print(2, "%s info: Pin is zero, value: %d!\n", progname, value); */ - return 1; + return -1; } @@ -645,7 +645,8 @@ static int avrftdi_open(PROGRAMMER * pgm, char *port) break; } - avrftdi_pin_setup(pgm); + if(avrftdi_pin_setup(pgm)) + return -1; /********************************************** * set the ready LED and set our direction up *