diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2019-12-20 23:23:26 +0100 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2020-03-07 15:28:53 +0000 |
commit | e1051e1090d4dce0e45d428345015af285a21d7e (patch) | |
tree | 8b9abf6c4330901ba1655afeb8a340e05fc61234 /src/flash/nor/tms470.c | |
parent | b8524295002076a3f0e9e2211298a69a6ba9d858 (diff) | |
download | riscv-openocd-e1051e1090d4dce0e45d428345015af285a21d7e.zip riscv-openocd-e1051e1090d4dce0e45d428345015af285a21d7e.tar.gz riscv-openocd-e1051e1090d4dce0e45d428345015af285a21d7e.tar.bz2 |
flash/nor/fm4,tms470: fix clang static analyzer warnings
Change-Id: I18c1501918d40453fea6aeeb6f035e46d41fc524
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/5366
Tested-by: jenkins
Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
Diffstat (limited to 'src/flash/nor/tms470.c')
-rw-r--r-- | src/flash/nor/tms470.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index 90557b8..bc16aca 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -709,6 +709,7 @@ static int tms470_erase_sector(struct flash_bank *bank, int sector) * Select one or more bits in FMBSEA or FMBSEB to disable Level 1 * protection for the particular sector to be erased/written. */ + assert(sector >= 0); if (sector < 16) { target_read_u32(target, 0xFFE88008, &fmbsea); target_write_u32(target, 0xFFE88008, fmbsea | (1 << sector)); |