summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-06-13 10:38:33 +0200
committerMichal Simek <michal.simek@xilinx.com>2018-06-15 08:54:05 +0200
commite3c26b8d954084613de7a13fa6472d2f03429d0e (patch)
treefe6a4523271fc3567d3d3f55225628d76e33436d
parent1e3e68f109d6f4ac934319dee9e7928cfdce895c (diff)
downloadu-boot-e3c26b8d954084613de7a13fa6472d2f03429d0e.tar.gz
u-boot-e3c26b8d954084613de7a13fa6472d2f03429d0e.tar.xz
u-boot-e3c26b8d954084613de7a13fa6472d2f03429d0e.zip
arm64: zynqmp: Check return value in zynqmp_mmio_rawwrite()
There should be return value check from zynqmp_mmio_read() in zynqmp_mmio_rawwrite() to make sure that errors are propagated properly. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r--arch/arm/cpu/armv8/zynqmp/cpu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c
index e122be59c7..1279dc8658 100644
--- a/arch/arm/cpu/armv8/zynqmp/cpu.c
+++ b/arch/arm/cpu/armv8/zynqmp/cpu.c
@@ -212,8 +212,12 @@ static int zynqmp_mmio_rawwrite(const u32 address,
{
u32 data;
u32 value_local = value;
+ int ret;
+
+ ret = zynqmp_mmio_read(address, &data);
+ if (ret)
+ return ret;
- zynqmp_mmio_read(address, &data);
data &= ~mask;
value_local &= mask;
value_local |= data;