drivers: net: aquantia: fix unsigned compared against 0
authorCosmin-Florin Aluchenesei <aluchenesei.cosmin-florin@nxp.com>
Wed, 21 Jul 2021 16:13:11 +0000 (19:13 +0300)
committerRamon Fried <rfried.dev@gmail.com>
Thu, 22 Jul 2021 19:15:33 +0000 (22:15 +0300)
Change the reg variable to not be unsigned so that we not get into an
unsigned compared against 0.

Signed-off-by: Cosmin-Florin Aluchenesei <aluchenesei.cosmin-florin@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/phy/aquantia.c

index 9061afa6203ebf9274045a3d3a4426eed5fa05b7..d3d35a75d065a11f6391f9a90ff731d61566f5d5 100644 (file)
@@ -3,7 +3,7 @@
  * Aquantia PHY drivers
  *
  * Copyright 2014 Freescale Semiconductor, Inc.
- * Copyright 2018 NXP
+ * Copyright 2018, 2021 NXP
  */
 #include <config.h>
 #include <common.h>
@@ -554,8 +554,9 @@ int aquantia_config(struct phy_device *phydev)
 
 int aquantia_startup(struct phy_device *phydev)
 {
-       u32 reg, speed;
+       u32 speed;
        int i = 0;
+       int reg;
 
        phydev->duplex = DUPLEX_FULL;