summaryrefslogtreecommitdiff
path: root/board/xilinx/zynqmp/zynqmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/xilinx/zynqmp/zynqmp.c')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 080fb59ef7..81c10fcf8a 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -596,6 +596,8 @@ int board_late_init(void)
new_targets = calloc(1, strlen(mode) + env_targets_len + 2 +
bootseq_len);
+ if (!new_targets)
+ return -ENOMEM;
if (bootseq >= 0)
sprintf(new_targets, "%s%x %s", mode, bootseq,