diff options
Diffstat (limited to 'src/flash/nor/pic32mx.c')
-rw-r--r-- | src/flash/nor/pic32mx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c index 38f900f..5e6c99f 100644 --- a/src/flash/nor/pic32mx.c +++ b/src/flash/nor/pic32mx.c @@ -515,7 +515,7 @@ static int pic32mx_write_block(struct flash_bank *bank, const uint8_t *buffer, uint8_t *new_buffer = NULL; if (row_offset && (count >= (row_size / 4))) { new_buffer = malloc(buffer_size); - if (new_buffer == NULL) { + if (!new_buffer) { LOG_ERROR("Out of memory"); return ERROR_FAIL; } |