diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-06-09 16:01:45 +0300 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2023-06-09 16:01:45 +0300 |
commit | b79dec951a5ed81cdd6de88e619c1a8e3f88200f (patch) | |
tree | ecb1b68c4a8d0babedb456abdcdaef072cc624fd /drivers/firmware | |
parent | 24138ec0a39a27c179cdb2465ee4a5242754b45d (diff) | |
parent | a49e482c52d551b46ec10fb12bbf5ad242848a59 (diff) | |
download | linux-b79dec951a5ed81cdd6de88e619c1a8e3f88200f.tar.xz |
Merge tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx into soc/drivers
arm64: ZynqMP SoC changes for v6.5
soc-power
- Use of_property_present() instead of of_find_property()
soc-event
- Avoid use after free eve_data in event manager code
firmware:
- Extend zynqmp_pm_fpga_load() interface
MAINTAINERS:
- Clean xilinx records
* tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx:
MAINTAINERS: Switch to @amd.com emails
MAINTAINERS: Remove Hyun and Anurag from maintainer list
firmware: xilinx: Update the zynqmp_pm_fpga_load() API
driver: soc: xilinx: use _safe loop iterator to avoid a use after free
soc: xilinx: Use of_property_present() for testing DT property presence
Link: https://lore.kernel.org/r/411aee78-e7e8-5966-cbe8-40ff45e27ba2@monstr.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/xilinx/zynqmp.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/firmware/xilinx/zynqmp.c b/drivers/firmware/xilinx/zynqmp.c index a736db4a5825..9e585b5646df 100644 --- a/drivers/firmware/xilinx/zynqmp.c +++ b/drivers/firmware/xilinx/zynqmp.c @@ -942,8 +942,16 @@ EXPORT_SYMBOL_GPL(zynqmp_pm_reset_get_status); */ int zynqmp_pm_fpga_load(const u64 address, const u32 size, const u32 flags) { - return zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address), - upper_32_bits(address), size, flags, NULL); + u32 ret_payload[PAYLOAD_ARG_CNT]; + int ret; + + ret = zynqmp_pm_invoke_fn(PM_FPGA_LOAD, lower_32_bits(address), + upper_32_bits(address), size, flags, + ret_payload); + if (ret_payload[0]) + return -ret_payload[0]; + + return ret; } EXPORT_SYMBOL_GPL(zynqmp_pm_fpga_load); |