提交 82607255 编写于 作者: B Bruce Allan 提交者: Jeff Kirsher

e1000e: cleanup: always return 0

These are a few instances of returning a value that can only be 0 so just
use a 'return 0' to make it more obvious.
Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
Tested-by: NAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 7eb61d81
...@@ -796,7 +796,7 @@ static s32 e1000_update_nvm_checksum_82571(struct e1000_hw *hw) ...@@ -796,7 +796,7 @@ static s32 e1000_update_nvm_checksum_82571(struct e1000_hw *hw)
* otherwise, commit the checksum to the flash NVM. * otherwise, commit the checksum to the flash NVM.
*/ */
if (hw->nvm.type != e1000_nvm_flash_hw) if (hw->nvm.type != e1000_nvm_flash_hw)
return ret_val; return 0;
/* Check for pending operations. */ /* Check for pending operations. */
for (i = 0; i < E1000_FLASH_UPDATES; i++) { for (i = 0; i < E1000_FLASH_UPDATES; i++) {
......
...@@ -1948,7 +1948,7 @@ static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw, bool active) ...@@ -1948,7 +1948,7 @@ static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
u16 data; u16 data;
if (phy->type == e1000_phy_ife) if (phy->type == e1000_phy_ife)
return ret_val; return 0;
phy_ctrl = er32(PHY_CTRL); phy_ctrl = er32(PHY_CTRL);
......
...@@ -444,7 +444,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw) ...@@ -444,7 +444,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)
return ret_val; return ret_val;
if (!link) if (!link)
return ret_val; /* No link detected */ return 0; /* No link detected */
mac->get_link_status = false; mac->get_link_status = false;
......
...@@ -1916,7 +1916,7 @@ s32 e1000e_get_cable_length_igp_2(struct e1000_hw *hw) ...@@ -1916,7 +1916,7 @@ s32 e1000e_get_cable_length_igp_2(struct e1000_hw *hw)
phy->cable_length = (phy->min_cable_length + phy->max_cable_length) / 2; phy->cable_length = (phy->min_cable_length + phy->max_cable_length) / 2;
return ret_val; return 0;
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册