From eab488da92c34b7d72da07e9f1526cc86b1410a7 Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Thu, 1 Jul 2010 12:25:34 +1200 Subject: [PATCH] fet: continue even if set VCC fails. This is not a fatal error under all circumstances, for example when debugging a board with external power applied. --- fet.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fet.c b/fet.c index c59f77e..d442521 100644 --- a/fet.c +++ b/fet.c @@ -870,12 +870,10 @@ device_t fet_open(transport_t transport, int proto_flags, int vcc_mv, goto fail; /* set VCC */ - if (xfer(dev, C_VCC, NULL, 0, 1, vcc_mv) < 0) { - fprintf(stderr, "fet: set VCC failed\n"); - goto fail; - } - - printf("Set Vcc: %d mV\n", vcc_mv); + if (xfer(dev, C_VCC, NULL, 0, 1, vcc_mv) < 0) + fprintf(stderr, "warning: fet: set VCC failed\n"); + else + printf("Set Vcc: %d mV\n", vcc_mv); /* Identify the chip */ if (do_identify(dev, force_id) < 0) {