diff options
Diffstat (limited to 'src/flash/nor/xcf.c')
-rw-r--r-- | src/flash/nor/xcf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/flash/nor/xcf.c b/src/flash/nor/xcf.c index 1a37e9c..fd31c9d 100644 --- a/src/flash/nor/xcf.c +++ b/src/flash/nor/xcf.c @@ -572,7 +572,7 @@ FLASH_BANK_COMMAND_HANDLER(xcf_flash_bank_command) struct xcf_priv *priv; priv = malloc(sizeof(struct xcf_priv)); - if (priv == NULL) { + if (!priv) { LOG_ERROR("no memory for flash bank info"); return ERROR_FAIL; } @@ -629,7 +629,7 @@ static int xcf_probe(struct flash_bank *bank) } bank->sectors = malloc(bank->num_sectors * sizeof(struct flash_sector)); - if (bank->sectors == NULL) { + if (!bank->sectors) { LOG_ERROR("No memory for sector table"); return ERROR_FAIL; } |