openocd: fix simple cases of NULL comparison
[fw/openocd] / src / flash / nor / bluenrg-x.c
index f533d54e9c01e8804eb4f7076412b3e6ed862654..a686e83d3920ba40f4e3fa2f0fda5a0428ddbe3c 100644 (file)
@@ -94,7 +94,7 @@ FLASH_BANK_COMMAND_HANDLER(bluenrgx_flash_bank_command)
        bluenrgx_info = calloc(1, sizeof(*bluenrgx_info));
 
        /* Check allocation */
-       if (bluenrgx_info == NULL) {
+       if (!bluenrgx_info) {
                LOG_ERROR("failed to allocate bank structure");
                return ERROR_FAIL;
        }