Commit 3a3104e7 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher

e1000e: cleanup magic number

Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 1860ac84
...@@ -464,8 +464,8 @@ s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num, ...@@ -464,8 +464,8 @@ s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num,
if (nvm_data != NVM_PBA_PTR_GUARD) { if (nvm_data != NVM_PBA_PTR_GUARD) {
e_dbg("NVM PBA number is not stored as string\n"); e_dbg("NVM PBA number is not stored as string\n");
/* we will need 11 characters to store the PBA */ /* make sure callers buffer is big enough to store the PBA */
if (pba_num_size < 11) { if (pba_num_size < E1000_PBANUM_LENGTH) {
e_dbg("PBA string buffer too small\n"); e_dbg("PBA string buffer too small\n");
return E1000_ERR_NO_SPACE; return E1000_ERR_NO_SPACE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment