Patchwork [net-next,6/7] be2net: Initialize "status" in be_cmd_get_die_temperature()

login
register
mail settings
Submitter Sathya Perla
Date Aug. 6, 2013, 3:57 a.m.
Message ID <1375761441-22343-7-git-send-email-sathya.perla@emulex.com>
Download mbox | patch
Permalink /patch/264848/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sathya Perla - Aug. 6, 2013, 3:57 a.m.
From: Vasundhara Volam <vasundhara.volam@emulex.com>

Uninitialized value was being returned in the non-failure case.
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_cmds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 9f04dac..1e0a05d 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -1532,7 +1532,7 @@  int be_cmd_get_die_temperature(struct be_adapter *adapter)
 {
 	struct be_mcc_wrb *wrb;
 	struct be_cmd_req_get_cntl_addnl_attribs *req;
-	int status;
+	int status = 0;
 
 	spin_lock_bh(&adapter->mcc_lock);