]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
e1000e: cleanup: always return 0
authorBruce Allan <bruce.w.allan@intel.com>
Wed, 8 Feb 2012 02:55:09 +0000 (02:55 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 07:49:22 +0000 (15:49 +0800)
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.

(cherry picked from commit 826072555b0dceac44a6e69a0c5be137e829c9d4)
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/e1000e/82571.c
drivers/net/e1000e/ich8lan.c
drivers/net/e1000e/mac.c
drivers/net/e1000e/phy.c

index bb1fff9affe4998e56c5c115d195e929da79d34d..bac03a565d5d15446de8d5555a88de3a6f7cd287 100644 (file)
@@ -796,7 +796,7 @@ static s32 e1000_update_nvm_checksum_82571(struct e1000_hw *hw)
         * otherwise, commit the checksum to the flash NVM.
         */
        if (hw->nvm.type != e1000_nvm_flash_hw)
-               return ret_val;
+               return 0;
 
        /* Check for pending operations. */
        for (i = 0; i < E1000_FLASH_UPDATES; i++) {
index a6b795bd69b711aca5c41d002c458440eda4bee3..892c7eb12357af6ffe721895f069642ca820b733 100644 (file)
@@ -1948,7 +1948,7 @@ static s32 e1000_set_d0_lplu_state_ich8lan(struct e1000_hw *hw, bool active)
        u16 data;
 
        if (phy->type == e1000_phy_ife)
-               return ret_val;
+               return 0;
 
        phy_ctrl = er32(PHY_CTRL);
 
index ce8a55a584be9048e26d50813ee21f81e7650ec1..b3b2f9e567ffc9b4dc75b075011771144e471b6f 100644 (file)
@@ -444,7 +444,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)
                return ret_val;
 
        if (!link)
-               return ret_val; /* No link detected */
+               return 0;       /* No link detected */
 
        mac->get_link_status = false;
 
index 323cb145f84979ce846bbb772e472df6f7759561..a8b99bae022201ddc0802cbf93fa436fdd79c0a0 100644 (file)
@@ -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;
 
-       return ret_val;
+       return 0;
 }
 
 /**