aboutsummaryrefslogtreecommitdiff
path: root/src/flash
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash')
-rw-r--r--src/flash/nor/ath79.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/flash/nor/ath79.c b/src/flash/nor/ath79.c
index d73a4916..520f6c5b 100644
--- a/src/flash/nor/ath79.c
+++ b/src/flash/nor/ath79.c
@@ -653,13 +653,6 @@ static int ath79_write(struct flash_bank *bank, const uint8_t *buffer,
LOG_DEBUG("%s: offset=0x%08" PRIx32 " count=0x%08" PRIx32,
__func__, offset, count);
- if (offset < bank->base || offset >= bank->base + bank->size) {
- LOG_ERROR("Start address out of range");
- return ERROR_FAIL;
- }
-
- offset -= bank->base;
-
if (target->state != TARGET_HALTED) {
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;
@@ -729,13 +722,6 @@ static int ath79_read(struct flash_bank *bank, uint8_t *buffer,
LOG_DEBUG("%s: offset=0x%08" PRIx32 " count=0x%08" PRIx32,
__func__, offset, count);
- if (offset < bank->base || offset >= bank->base + bank->size) {
- LOG_ERROR("Start address out of range");
- return ERROR_FAIL;
- }
-
- offset -= bank->base;
-
if (target->state != TARGET_HALTED) {
LOG_ERROR("Target not halted");
return ERROR_TARGET_NOT_HALTED;