i40e: fix compile warning on checksum_local
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 17 Jan 2014 23:36:31 +0000 (15:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Jan 2014 03:13:03 +0000 (19:13 -0800)
Compile testing with higher warning levels found this complaint:
i40e_nvm.c: warning: 'checksum_local' may be used uninitialized in
this function

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_nvm.c

index e12bf07fd23d91d7a96b4db89d4881774605545e..73f95b081927c13413f7a006a6638195b3929507 100644 (file)
@@ -323,7 +323,7 @@ i40e_status i40e_validate_nvm_checksum(struct i40e_hw *hw,
 {
        i40e_status ret_code = 0;
        u16 checksum_sr = 0;
-       u16 checksum_local;
+       u16 checksum_local = 0;
 
        ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
        if (ret_code)