aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2020-10-21 12:16:02 +0200
committerMichal Simek <michal.simek@xilinx.com>2020-10-27 08:13:32 +0100
commitd026aa1de3330face74ccecb265bcfe722bcd20a (patch)
tree293fb0e513d79e1c98a0ad10836f7cbbb3e9de14 /board
parentf149b39ca3afbe3645f3e50ebd8a1e8af9a445a3 (diff)
downloadu-boot-d026aa1de3330face74ccecb265bcfe722bcd20a.zip
u-boot-d026aa1de3330face74ccecb265bcfe722bcd20a.tar.gz
u-boot-d026aa1de3330face74ccecb265bcfe722bcd20a.tar.bz2
xilinx: zynqmp: Check return value from xilinx_pm_request()
xilinx_pm_request() can failed that's why also check return value. Fixes: 050f10f103cd ("xilinx: zynqmp: remove chip_id function") Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index db3f597..e658245 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -192,7 +192,11 @@ static char *zynqmp_get_silicon_idcode_name(void)
u32 ret_payload[PAYLOAD_ARG_CNT];
int ret;
- xilinx_pm_request(PM_GET_CHIPID, 0, 0, 0, 0, ret_payload);
+ ret = xilinx_pm_request(PM_GET_CHIPID, 0, 0, 0, 0, ret_payload);
+ if (ret) {
+ debug("%s: Getting chipid failed\n", __func__);
+ return "unknown";
+ }
/*
* Firmware returns: