Skip to content

Commit

Permalink
net: phy: micrel: Fixed error related to uninitialized symbol ret
Browse files Browse the repository at this point in the history
Initialized return variable

Fixes Old smatch warnings:
drivers/net/phy/micrel.c:1750 ksz886x_cable_test_get_status() error:
uninitialized symbol 'ret'.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Divya Koppera <Divya.Koppera@microchip.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Divya Koppera authored and David S. Miller committed Jan 9, 2023
1 parent f23395b commit d50ede4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/phy/micrel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2088,7 +2088,8 @@ static int ksz886x_cable_test_get_status(struct phy_device *phydev,
const struct kszphy_type *type = phydev->drv->driver_data;
unsigned long pair_mask = type->pair_mask;
int retries = 20;
int pair, ret;
int ret = 0;
int pair;

*finished = false;

Expand Down

0 comments on commit d50ede4

Please sign in to comment.