diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-11-02 18:17:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-04 08:06:26 -0500 |
commit | c7079857cd89cb5bc686df1d441db8ef0137abf1 (patch) | |
tree | b3bad0d98018485e092b26d488d1f49271cc5a47 /drivers/net/bnx2.c | |
parent | fd2c3ef761fbc5e6c27fa7d40b30cda06bfcd7d8 (diff) |
bnx2: avoid compiler warnings
drivers/net/bnx2.c: In function ‘bnx2_enable_forced_2g5’:
drivers/net/bnx2.c:1447: warning: ‘bmcr’ may be used uninitialized in this function
drivers/net/bnx2.c: In function ‘bnx2_disable_forced_2g5’:
drivers/net/bnx2.c:1482: warning: ‘bmcr’ may be used uninitialized in this function
One fix would be to have an initial value, but a plain return might be better.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 08cddb6ff740..539d23b594ce 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -1466,6 +1466,8 @@ bnx2_enable_forced_2g5(struct bnx2 *bp) | |||
1466 | } else if (CHIP_NUM(bp) == CHIP_NUM_5708) { | 1466 | } else if (CHIP_NUM(bp) == CHIP_NUM_5708) { |
1467 | bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); | 1467 | bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); |
1468 | bmcr |= BCM5708S_BMCR_FORCE_2500; | 1468 | bmcr |= BCM5708S_BMCR_FORCE_2500; |
1469 | } else { | ||
1470 | return; | ||
1469 | } | 1471 | } |
1470 | 1472 | ||
1471 | if (bp->autoneg & AUTONEG_SPEED) { | 1473 | if (bp->autoneg & AUTONEG_SPEED) { |
@@ -1500,6 +1502,8 @@ bnx2_disable_forced_2g5(struct bnx2 *bp) | |||
1500 | } else if (CHIP_NUM(bp) == CHIP_NUM_5708) { | 1502 | } else if (CHIP_NUM(bp) == CHIP_NUM_5708) { |
1501 | bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); | 1503 | bnx2_read_phy(bp, bp->mii_bmcr, &bmcr); |
1502 | bmcr &= ~BCM5708S_BMCR_FORCE_2500; | 1504 | bmcr &= ~BCM5708S_BMCR_FORCE_2500; |
1505 | } else { | ||
1506 | return; | ||
1503 | } | 1507 | } |
1504 | 1508 | ||
1505 | if (bp->autoneg & AUTONEG_SPEED) | 1509 | if (bp->autoneg & AUTONEG_SPEED) |