summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Goodbody <andrew.goodbody@linaro.org>2025-08-05 15:18:18 +0100
committerJerome Forissier <jerome.forissier@linaro.org>2025-08-18 15:47:57 +0200
commit3aa3d37282414ea5c19ea415f46d214f4c80d8b6 (patch)
tree1322b14d37ddbd505cbd2f70dce6904b16f590cd
parent6781b90f89b427ec9445c43f8102ebe0a4330e54 (diff)
net: mvpp2: Cannot test unsigned variable to be negative
In phy_info_parse all uses of the variable phyaddr are as an int so declaring as u32 is not useful and prevents the test for an error return from fdtdec_get_int ever detecting an error. Change phyaddr to be an int. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
-rw-r--r--drivers/net/mvpp2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index b68d305a0dc..3a3510f603a 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -4734,7 +4734,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
int port_node = dev_of_offset(dev);
int phy_node;
u32 id;
- u32 phyaddr = 0;
+ int phyaddr = 0;
int fixed_link = 0;
int ret;