[PATCH 14/15] clk: zynqmp: Fix wrong error check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux