openocd: remove CamelCase symbols *xPSR*
[fw/openocd] / src / flash / nand / davinci.c
index 167b40150406c97c118a8b18255d4a71f4ccd3e3..28e31f2a45b4bacbd7666dbba17e7995879c9c7d 100644 (file)
@@ -1,18 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
 /***************************************************************************
  *   Copyright (C) 2009 by David Brownell                                  *
- *                                                                         *
- *   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/>. *
  ***************************************************************************/
 
 /*
@@ -605,8 +594,6 @@ static int davinci_write_page_ecc4infix(struct nand_device *nand, uint32_t page,
                /* write this "out-of-band" data -- infix */
                davinci_write_block_data(nand, oob, 16);
                oob += 16;
-               oob_size -= 16;
-
        } while (data_size);
 
        /* the last data and OOB writes included the spare area */
@@ -731,7 +718,7 @@ NAND_DEVICE_COMMAND_HANDLER(davinci_nand_device_command)
        }
 
        info = calloc(1, sizeof(*info));
-       if (info == NULL)
+       if (!info)
                goto fail;
 
        info->eccmode = eccmode;