e1000e: cleanup: remove e1000e_commit_phy()
Remove the function e1000e_commit_phy() and replace the few calls to it with the same function pointer that it would call. The function pointer is almost always set for the devices that access these code paths so there is no risk of a NULL pointer dereference; for the few instances where the function pointer might not be set (i.e. can be called for the few devices which do not have this function pointer set), check for a valid function pointer. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:

committed by
Jeff Kirsher

parent
dde3a5745c
commit
6b598e1eac
@@ -1010,7 +1010,7 @@ static s32 e1000_copper_link_setup_gg82563_80003es2lan(struct e1000_hw *hw)
|
||||
return ret_val;
|
||||
|
||||
/* SW Reset the PHY so all changes take effect */
|
||||
ret_val = e1000e_commit_phy(hw);
|
||||
ret_val = hw->phy.ops.commit(hw);
|
||||
if (ret_val) {
|
||||
e_dbg("Error Resetting the PHY\n");
|
||||
return ret_val;
|
||||
|
Reference in New Issue
Block a user