diff options
Diffstat (limited to 'src/flash/nor/at91sam4l.c')
-rw-r--r-- | src/flash/nor/at91sam4l.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/flash/nor/at91sam4l.c b/src/flash/nor/at91sam4l.c index d356398d..d4bfe531 100644 --- a/src/flash/nor/at91sam4l.c +++ b/src/flash/nor/at91sam4l.c @@ -601,6 +601,7 @@ static int sam4l_write(struct flash_bank *bank, const uint8_t *buffer, /* There's at least one aligned page to write out. */ if (count >= chip->page_size) { + assert(chip->page_size > 0); int np = count / chip->page_size + ((count % chip->page_size) ? 1 : 0); for (int i = 0; i < np; i++) { |