Skip to content

Commit 48eb5b9

Browse files
Daniel Borkmanndavem330
authored andcommitted
ixgbe: phy: fix uninitialized status in ixgbe_setup_phy_link_tnx
Status variable is never initialized, can carry an arbitrary value on the stack and thus may let the function fail. Fixes: e90dd26 ("ixgbe: Make return values more direct") Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Emil Tantilov <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 79ce047 commit 48eb5b9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,6 @@ s32 ixgbe_check_phy_link_tnx(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
635635
**/
636636
s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw)
637637
{
638-
s32 status;
639638
u16 autoneg_reg = IXGBE_MII_AUTONEG_REG;
640639
bool autoneg = false;
641640
ixgbe_link_speed speed;
@@ -700,8 +699,7 @@ s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw)
700699

701700
hw->phy.ops.write_reg(hw, MDIO_CTRL1,
702701
MDIO_MMD_AN, autoneg_reg);
703-
704-
return status;
702+
return 0;
705703
}
706704

707705
/**

0 commit comments

Comments
 (0)