aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2014-02-08 11:51:40 -0800
committerPaul Fertser <fercerpav@gmail.com>2014-03-29 08:43:43 +0000
commite0f0ce965dbcaadb703a16706d70fd4ba0da90df (patch)
tree13a66b056741ca55678b851c9a116805e5e1619f /src
parent207237b92005d604b75ff5280042a6c286a685f8 (diff)
at91samd: Remove 'first' and 'last' checks in 'samd_erase'
Remove 'first' and 'last' checks in 'samd_protect' since those parameters are checked in 'handle_flash_erase_command'. Change-Id: I30e5598a9ab656d81055f26cc63e291377605300 Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-on: http://openocd.zylin.com/2024 Tested-by: jenkins Reviewed-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/flash/nor/at91samd.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c
index 5af61ab4..acda3bb7 100644
--- a/src/flash/nor/at91samd.c
+++ b/src/flash/nor/at91samd.c
@@ -352,13 +352,6 @@ static int samd_erase(struct flash_bank *bank, int first, int last)
return ERROR_FLASH_BANK_NOT_PROBED;
}
- /* Make sure the sectors make sense. */
- if (first >= bank->num_sectors || last >= bank->num_sectors) {
- LOG_ERROR("Erase range %d - %d not valid (%d sectors total)",
- first, last, bank->num_sectors);
- return ERROR_FAIL;
- }
-
/* The SAMD NVM has row erase granularity. There are four pages in a row
* and the number of rows in a sector depends on the sector size, which in
* turn depends on the Flash capacity as there is a fixed number of