summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Tieman <henry.w.tieman@intel.com>2016-11-08 13:05:06 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-12-02 23:13:33 -0800
commit27e5f25b917b4d388ffba8dbfae4952834d48e49 (patch)
treed3683754145f61b8eb73715c7ead47ad7eb82139
parent47d2a5d8279dcdcaec2c67b3d2c72cfa62979c58 (diff)
i40e: Remove unreachable code
The code at the end of i40e_read_phy_register_clause22() contained unreachable code and redundant control statements. This change removes the unreachable code. And deletes the redundant goto statement and if statement. Change-ID: I713032b1585396f40f903cbcfdea987abd874400 Signed-off-by: Henry Tieman <henry.w.tieman@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_common.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index e83e8e399547..fc7ce0238dea 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -4439,19 +4439,12 @@ i40e_status i40e_read_phy_register_clause22(struct i40e_hw *hw,
if (status) {
i40e_debug(hw, I40E_DEBUG_PHY,
"PHY: Can't write command to external PHY.\n");
- goto phy_read_end;
- }
-
- if (!status) {
+ } else {
command = rd32(hw, I40E_GLGEN_MSRWD(port_num));
*value = (command & I40E_GLGEN_MSRWD_MDIRDDATA_MASK) >>
I40E_GLGEN_MSRWD_MDIRDDATA_SHIFT;
- } else {
- i40e_debug(hw, I40E_DEBUG_PHY,
- "PHY: Can't read register value from external PHY.\n");
}
-phy_read_end:
return status;
}