[PATCH 14/15] clk: zynqmp: Fix wrong error check
Sascha Hauer
s.hauer at pengutronix.de
Mon May 17 11:54:23 PDT 2021
The return value of zynqmp_get_parent_names() is assigned to an unsigned
type which is then checked for being smaller than zero. Use a signed
type instead.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/clk/zynqmp/clkc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/zynqmp/clkc.c b/drivers/clk/zynqmp/clkc.c
index 366a12e70a..86d85b6daa 100644
--- a/drivers/clk/zynqmp/clkc.c
+++ b/drivers/clk/zynqmp/clkc.c
@@ -453,7 +453,7 @@ static int zynqmp_register_clocks(struct device_d *dev,
const char *parent_names[MAX_PARENT];
char *name;
struct device_node *node = dev->device_node;
- unsigned int num_parents;
+ int num_parents;
for (i = 0; i < num_clocks; i++) {
if (zynqmp_get_clock_type(i) != CLK_TYPE_OUTPUT)
--
2.29.2
More information about the barebox
mailing list