aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/psoc5lp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/nor/psoc5lp.c')
-rw-r--r--src/flash/nor/psoc5lp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/psoc5lp.c b/src/flash/nor/psoc5lp.c
index 6fcb706..f383213 100644
--- a/src/flash/nor/psoc5lp.c
+++ b/src/flash/nor/psoc5lp.c
@@ -1113,7 +1113,7 @@ static int psoc5lp_erase_check(struct flash_bank *bank)
struct target_memory_check_block *block_array;
block_array = malloc(num_sectors * sizeof(struct target_memory_check_block));
- if (block_array == NULL)
+ if (!block_array)
return ERROR_FAIL;
for (unsigned int i = 0; i < num_sectors; i++) {