diff options
author | David Ertman <david.m.ertman@intel.com> | 2014-07-09 16:07:42 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-07-25 20:51:00 -0700 |
commit | 491a04d2812b0a665bda34ea39875833dc7a1aaf (patch) | |
tree | dccfd1e8134272c43c712d10f7f83ebadce1b1de /drivers/net/ethernet/intel/e1000e/manage.c | |
parent | 493004d04f56fd7d642bdbb2938e17e5f7d622d1 (diff) | |
download | linux-491a04d2812b0a665bda34ea39875833dc7a1aaf.tar.bz2 |
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/manage.c')
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/manage.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/manage.c b/drivers/net/ethernet/intel/e1000e/manage.c index cb37ff1f1321..58856032298d 100644 --- a/drivers/net/ethernet/intel/e1000e/manage.c +++ b/drivers/net/ethernet/intel/e1000e/manage.c @@ -327,9 +327,12 @@ bool e1000e_enable_mng_pass_thru(struct e1000_hw *hw) } else if ((hw->mac.type == e1000_82574) || (hw->mac.type == e1000_82583)) { u16 data; + s32 ret_val; factps = er32(FACTPS); - e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data); + ret_val = e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data); + if (ret_val) + return false; if (!(factps & E1000_FACTPS_MNGCG) && ((data & E1000_NVM_INIT_CTRL2_MNGM) == |