diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-17 20:54:18 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-18 08:24:46 +0200 |
commit | c6d4e21916fc708a446189d4d5f2310e2a32fd76 (patch) | |
tree | 577638abce46b0c9f135df6e60d1e1f8ab3a1465 /arch/arm/mach-layerscape | |
parent | 93b564d9acc7ce9b8ab1180e4af9e33aaad7d0f6 (diff) | |
download | barebox-c6d4e21916fc708a446189d4d5f2310e2a32fd76.tar.gz barebox-c6d4e21916fc708a446189d4d5f2310e2a32fd76.tar.xz |
ARM: layerscape: Fix wrong error check
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@pengutronix.de>
Link: https://lore.barebox.org/20210517185424.32145-10-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-layerscape')
-rw-r--r-- | arch/arm/mach-layerscape/icid.c | 4 |
1 files 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); |