From: Michal Simek Date: Wed, 21 Oct 2020 10:16:02 +0000 (+0200) Subject: xilinx: zynqmp: Check return value from xilinx_pm_request() X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=d026aa1de3330face74ccecb265bcfe722bcd20a;p=u-boot.git 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 --- diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index db3f5978a9..e658245408 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: