aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/mdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/nor/mdr.c')
-rw-r--r--src/flash/nor/mdr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/mdr.c b/src/flash/nor/mdr.c
index e848419..228d4bc 100644
--- a/src/flash/nor/mdr.c
+++ b/src/flash/nor/mdr.c
@@ -328,7 +328,7 @@ static int mdr_write(struct flash_bank *bank, const uint8_t *buffer,
int rem = count % 4;
if (rem) {
new_buffer = malloc(count + rem);
- if (new_buffer == NULL) {
+ if (!new_buffer) {
LOG_ERROR("odd number of bytes to write and no memory for padding buffer");
return ERROR_FAIL;
}