summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/e1000e/nvm.c
diff options
context:
space:
mode:
authorDavid Ertman <david.m.ertman@intel.com>2014-07-09 20:07:42 +0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-07-26 07:51:00 +0400
commit491a04d2812b0a665bda34ea39875833dc7a1aaf (patch)
treedccfd1e8134272c43c712d10f7f83ebadce1b1de /drivers/net/ethernet/intel/e1000e/nvm.c
parent493004d04f56fd7d642bdbb2938e17e5f7d622d1 (diff)
downloadlinux-491a04d2812b0a665bda34ea39875833dc7a1aaf.tar.xz
e1000e: Add code to check return values on NVM accesses
Adding code to check and respond to previously ignored return values from NVM access functions. Issue discovered through static analysis. Signed-off-by: Dave Ertman <david.m.ertman@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/nvm.c')
-rw-r--r--drivers/net/ethernet/intel/e1000e/nvm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/nvm.c b/drivers/net/ethernet/intel/e1000e/nvm.c
index b1f212b7baf7..fa6b1036a327 100644
--- a/drivers/net/ethernet/intel/e1000e/nvm.c
+++ b/drivers/net/ethernet/intel/e1000e/nvm.c
@@ -327,8 +327,10 @@ s32 e1000e_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
ew32(EERD, eerd);
ret_val = e1000e_poll_eerd_eewr_done(hw, E1000_NVM_POLL_READ);
- if (ret_val)
+ if (ret_val) {
+ e_dbg("NVM read error: %d\n", ret_val);
break;
+ }
data[i] = (er32(EERD) >> E1000_NVM_RW_REG_DATA);
}