netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]: bnx2: Fix uninitialized variable warning in bnx2_disable_forced_2g5()
@ 2010-05-27 22:13 Prarit Bhargava
  2010-05-27 23:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Prarit Bhargava @ 2010-05-27 22:13 UTC (permalink / raw)
  To: netdev, mchan; +Cc: Prarit Bhargava

Fix warning:

drivers/net/bnx2.c: In function 'bnx2_disable_forced_2g5':
drivers/net/bnx2.c:1489: warning: 'bmcr' may be used uninitialized in this function

Signed-off-by: Prarit Bhargava <prarit@redhat.com>

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 667f419..7e2f8ac 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -1486,7 +1486,7 @@ bnx2_enable_forced_2g5(struct bnx2 *bp)
 static void
 bnx2_disable_forced_2g5(struct bnx2 *bp)
 {
-	u32 bmcr;
+	u32 uninitialized_var(bmcr);
 
 	if (!(bp->phy_flags & BNX2_PHY_FLAG_2_5G_CAPABLE))
 		return;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-27 23:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27 22:13 [PATCH]: bnx2: Fix uninitialized variable warning in bnx2_disable_forced_2g5() Prarit Bhargava
2010-05-27 23:26 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).