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 <[email protected]>
---
 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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to