* [U-Boot] [PATCH] arm64: zynqmp: Check return value in zynqmp_mmio_rawwrite()
@ 2018-06-13 8:44 Michal Simek
0 siblings, 0 replies; only message in thread
From: Michal Simek @ 2018-06-13 8:44 UTC (permalink / raw)
To: u-boot
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>
---
arch/arm/cpu/armv8/zynqmp/cpu.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c
index e122be59c747..1279dc8658a1 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;
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-13 8:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-13 8:44 [U-Boot] [PATCH] arm64: zynqmp: Check return value in zynqmp_mmio_rawwrite() Michal Simek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.