openocd: fix SPDX tag format for files .c
[fw/openocd] / src / jtag / drivers / usb_blaster / ublast_access_ftdi.c
index 23893e14dfe6553ec60a6ced3a479bc2fb0770e9..eb312ef4eeab548049f4aa15029969448a08fa42 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
 /*
  *   Driver for USB-JTAG, Altera USB-Blaster and compatibles
  *
@@ -9,16 +11,6 @@
  *   Copyright (C) 2009 Catalin Patulea cat@vv.carleton.ca
  *   Copyright (C) 2006 Kolja Waschk usbjtag@ixo.de
  *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
  */
 
 #ifdef HAVE_CONFIG_H
@@ -99,11 +91,10 @@ static int ublast_ftdi_init(struct ublast_lowlevel *low)
                return ERROR_JTAG_INIT_FAILED;
        }
 
-       if (ftdi_get_latency_timer(ftdic, &latency_timer) < 0) {
+       if (ftdi_get_latency_timer(ftdic, &latency_timer) < 0)
                LOG_ERROR("unable to get latency timer");
-               return ERROR_JTAG_INIT_FAILED;
-       }
-       LOG_DEBUG("current latency timer: %u", latency_timer);
+       else
+               LOG_DEBUG("current latency timer: %u", latency_timer);
 
        ftdi_disable_bitbang(ftdic);
        return ERROR_OK;