diff options
author | Michal Simek <michal.simek@xilinx.com> | 2021-10-15 17:57:38 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2021-10-21 09:54:49 +0300 |
commit | b05cc389bac1151aa6b14e2d6a66d06329d7e3fe (patch) | |
tree | c4f9e6f4ff30e10ef5405de7b161426980b3b6a6 /drivers/firmware | |
parent | eafdcda4a854932c0319656de7bf3f017f17ae67 (diff) | |
download | u-boot-b05cc389bac1151aa6b14e2d6a66d06329d7e3fe.tar.xz |
firmware: zynqmp: Handle errors from ipi_req properly
There are multiple errors what can happen in ipi_req but they are not
propagated properly. That's why propage all error properly.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Adrian Fiergolski <Adrian.Fiergolski@fastree3d.com>
Link: https://lore.kernel.org/r/7ac4f3b2104f04c72d287c46d1ccbce20f138fd4.1634309856.git.michal.simek@xilinx.com
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/firmware-zynqmp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c index d4dc856baf..7e0acc5bc8 100644 --- a/drivers/firmware/firmware-zynqmp.c +++ b/drivers/firmware/firmware-zynqmp.c @@ -164,6 +164,7 @@ int __maybe_unused xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2, * firmware API is limited by the SMC call size */ u32 regs[] = {api_id, arg0, arg1, arg2, arg3}; + int ret; if (api_id == PM_FPGA_LOAD) { /* Swap addr_hi/low because of incompatibility */ @@ -173,7 +174,10 @@ int __maybe_unused xilinx_pm_request(u32 api_id, u32 arg0, u32 arg1, u32 arg2, regs[2] = temp; } - ipi_req(regs, PAYLOAD_ARG_CNT, ret_payload, PAYLOAD_ARG_CNT); + ret = ipi_req(regs, PAYLOAD_ARG_CNT, ret_payload, + PAYLOAD_ARG_CNT); + if (ret) + return ret; #else return -EPERM; #endif |