[U-Boot] [PATCH] arm: zynq: Handle ENXIO error return value properly

Michal Simek michal.simek at xilinx.com
Mon Mar 26 11:54:11 UTC 2018


zynq_clk_get_rate() is also returning ENXIO which is not handled now.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 arch/arm/mach-zynq/clk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index 1369cd095b72..3c270386309d 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -94,7 +94,8 @@ int soc_clk_dump(void)
 
 			clk_free(&clk);
 
-			if (rate == (unsigned long)-ENOSYS)
+			if ((rate == (unsigned long)-ENOSYS) ||
+			    (rate == (unsigned long)-ENXIO))
 				printf("%10s%20s\n", name, "unknown");
 			else
 				printf("%10s%20lu\n", name, rate);
-- 
1.9.1



More information about the U-Boot mailing list