flash/nor/at91samd: Use 32-bit register writes for ST-Link compat
[fw/openocd] / src / target / arm11_dbgtap.c
index 0200647c11d35da9e96e129e9f6f7b16975164ad..b670bd7f7869d0b639d415e387a89b44af83f009 100644 (file)
@@ -1,21 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
 /***************************************************************************
  *   Copyright (C) 2008 digenius technology GmbH.                          *
  *   Michael Bruck                                                         *
  *                                                                         *
  *   Copyright (C) 2008,2009 Oyvind Harboe oyvind.harboe@zylin.com         *
- *                                                                         *
- *   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.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -586,7 +575,7 @@ static int arm11_run_instr_data_to_core_noack_inner(struct jtag_tap *tap,
        unsigned bytes = sizeof(*readies)*readies_num;
 
        readies = malloc(bytes);
-       if (readies == NULL) {
+       if (!readies) {
                LOG_ERROR("Out of memory allocating %u bytes", bytes);
                return ERROR_FAIL;
        }