[PATCH 09/15] ARM: layerscape: Fix wrong error check

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

 



The return value of get_fman_port_icid() is assigned to an unsigned
variable which is then error checked for being smaller than 0. Convert
the variable to a signed type to make this work.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/mach-layerscape/icid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-layerscape/icid.c b/arch/arm/mach-layerscape/icid.c
index aec57f4b3f..644401b181 100644
--- a/arch/arm/mach-layerscape/icid.c
+++ b/arch/arm/mach-layerscape/icid.c
@@ -305,8 +305,8 @@ static void fdt_fixup_fman_port_icid_by_compat(struct device_node *root,
 					       const char *compat)
 {
 	struct device_node *np;
-	int ret;
-	u32 cell_index, icid;
+	int ret, icid;
+	u32 cell_index;
 
 	for_each_compatible_node_from(np, root, NULL, compat) {
 		ret = of_property_read_u32(np, "cell-index", &cell_index);
-- 
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