amd-xgbe: Signedness bug in xgbe_phy_link_status()
Subsystems (4)
PATCH 1/1 amd-xgbe: Signedness bug in xgbe_phy_link_status()
"ret" needs to be signed for the error handling to work.
Fixes abf0a1c2b26a ("amd-xgbe: Add support for SFP+ modules")
Signed-off-by Dan Carpenter <[email protected]>
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +2 -1
@@ -2346,7 +2346,8 @@ static bool xgbe_phy_valid_speed(struct xgbe_prv_data *pdata, int speed)static int xgbe_phy_link_status (struct xgbe_prv_data *pdata,int *an_restart) {struct xgbe_phy_data *phy_data = pdata->phy_data; -unsigned int ret, reg; +unsigned int reg; +int ret; *an_restart =0 ;
Quoted 5 lines · Dan Carpenter
"ret" needs to be signed for the error handling to work.
Fixes abf0a1c2b26a ("amd-xgbe: Add support for SFP+ modules")Signed-off-by Dan Carpenter <[email protected]>
Hi Dan,
This was already identified and patched:8c5385cbb036 ("amd-xgbe: Fix up some coccinelle identified warnings")
Thanks,
Tom
Quoted 15 lines
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +2
-1@@ -2346,7 +2346,8 @@ static bool xgbe_phy_valid_speed(struct xgbe_prv_data *pdata, int speed)static int xgbe_phy_link_status (struct xgbe_prv_data *pdata,int *an_restart) {struct xgbe_phy_data *phy_data = pdata->phy_data; -unsigned int ret, reg; +unsigned int reg; +int ret; *an_restart =0 ;