doc: document 'atsamv gpnvm' command
[fw/openocd] / src / flash / nand / mx3.c
index abeaf159cc2e0d4354587a251e32188dd2894482..dc8d619a06a7695f240b3d46b32378bb5d4e17c5 100644 (file)
@@ -40,7 +40,7 @@ get_next_halfword_from_sram_buffer() not tested
 static const char target_not_halted_err_msg[] =
                "target must be halted to use mx3 NAND flash controller";
 static const char data_block_size_err_msg[] =
-               "minimal granularity is one half-word, %" PRId32 " is incorrect";
+               "minimal granularity is one half-word, %" PRIu32 " is incorrect";
 static const char sram_buffer_bounds_err_msg[] =
                "trying to access out of SRAM buffer bound (addr=0x%" PRIx32 ")";
 static const char get_status_register_err_msg[] = "can't get NAND status";
@@ -64,7 +64,7 @@ NAND_DEVICE_COMMAND_HANDLER(imx31_nand_device_command)
 {
        struct mx3_nf_controller *mx3_nf_info;
        mx3_nf_info = malloc(sizeof(struct mx3_nf_controller));
-       if (mx3_nf_info == NULL) {
+       if (!mx3_nf_info) {
                LOG_ERROR("no memory for nand controller");
                return ERROR_FAIL;
        }