summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/emulex/benet
diff options
context:
space:
mode:
authorIvan Vecera <ivecera@redhat.com>2015-11-18 14:06:34 +0100
committerDavid S. Miller <davem@davemloft.net>2015-11-18 15:21:41 -0500
commitd37b4c0a3647db23f41c5ee85701eec3544446d1 (patch)
tree902a854c1edef0032732576e03c2f8df834a48a0 /drivers/net/ethernet/emulex/benet
parent6fbaa57076ba46a1f2ebffdb47e1b64d5b4b5b9d (diff)
downloadlwn-d37b4c0a3647db23f41c5ee85701eec3544446d1.tar.gz
lwn-d37b4c0a3647db23f41c5ee85701eec3544446d1.zip
be2net: remove local variable 'status'
The lancer_cmd_get_file_len() uses lancer_cmd_read_object() to get the current size of registers for ethtool registers dump. Returned status value is stored but not checked. The check itself is not necessary as the data_read output variable is initialized to 0 and status variable can be removed. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_ethtool.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index 734f655c99c1..d2a5baf019ab 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -241,13 +241,11 @@ static u32 lancer_cmd_get_file_len(struct be_adapter *adapter, u8 *file_name)
u32 data_read = 0, eof;
u8 addn_status;
struct be_dma_mem data_len_cmd;
- int status;
memset(&data_len_cmd, 0, sizeof(data_len_cmd));
/* data_offset and data_size should be 0 to get reg len */
- status = lancer_cmd_read_object(adapter, &data_len_cmd, 0, 0,
- file_name, &data_read, &eof,
- &addn_status);
+ lancer_cmd_read_object(adapter, &data_len_cmd, 0, 0, file_name,
+ &data_read, &eof, &addn_status);
return data_read;
}