i40e: clean up local variable initialization
authorJean Sacren <sakiwit@gmail.com>
Tue, 13 Oct 2015 07:06:31 +0000 (01:06 -0600)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 23 Oct 2015 12:37:31 +0000 (05:37 -0700)
In both i40e_calc_nvm_checksum() and i40e_update_nvm_checksum(), the
local variables designated by 'ret_code' are overwritten immediately. As
such, they should merely be declared.

Signed-off-by: Jean Sacren <sakiwit@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_nvm.c

index 58e384a372a0e1fe20afb778561231d76e1e7b82..1715358a8a6c3c090cca70c4544d6e576e8d967e 100644 (file)
@@ -484,7 +484,7 @@ static i40e_status i40e_write_nvm_aq(struct i40e_hw *hw, u8 module_pointer,
 static i40e_status i40e_calc_nvm_checksum(struct i40e_hw *hw,
                                                    u16 *checksum)
 {
-       i40e_status ret_code = 0;
+       i40e_status ret_code;
        struct i40e_virt_mem vmem;
        u16 pcie_alt_module = 0;
        u16 checksum_local = 0;
@@ -564,7 +564,7 @@ i40e_calc_nvm_checksum_exit:
  **/
 i40e_status i40e_update_nvm_checksum(struct i40e_hw *hw)
 {
-       i40e_status ret_code = 0;
+       i40e_status ret_code;
        u16 checksum;
        __le16 le_sum;