e1000e: cleanup magic number
authorBruce Allan <bruce.w.allan@intel.com>
Wed, 5 Dec 2012 06:26:46 +0000 (06:26 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 16 Jan 2013 08:38:58 +0000 (00:38 -0800)
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/e1000e/nvm.c

index 71938ed..1e7882c 100644 (file)
@@ -464,8 +464,8 @@ s32 e1000_read_pba_string_generic(struct e1000_hw *hw, u8 *pba_num,
        if (nvm_data != NVM_PBA_PTR_GUARD) {
                e_dbg("NVM PBA number is not stored as string\n");
 
-               /* we will need 11 characters to store the PBA */
-               if (pba_num_size < 11) {
+               /* make sure callers buffer is big enough to store the PBA */
+               if (pba_num_size < E1000_PBANUM_LENGTH) {
                        e_dbg("PBA string buffer too small\n");
                        return E1000_ERR_NO_SPACE;
                }