arm: zynq: Handle ENXIO error return value properly
authorMichal Simek <michal.simek@xilinx.com>
Fri, 23 Feb 2018 12:39:37 +0000 (13:39 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 9 Apr 2018 06:02:50 +0000 (08:02 +0200)
zynq_clk_get_rate() is also returning ENXIO which is not handled now.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/mach-zynq/clk.c

index 1369cd0..3c27038 100644 (file)
@@ -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);