]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: fix condition of WARN_ONCE for stat strings
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 20 Aug 2018 15:12:27 +0000 (08:12 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 24 Aug 2018 15:52:35 +0000 (08:52 -0700)
commit43fdd25e1cdb66b5b165e5b9864d729921a6c7f0
tree9f46ad230e558251b9dbcbddfedae289dc7ed318
parent9c0c1ae121c4958ddaa1153049d47cd5c1e911aa
i40e: fix condition of WARN_ONCE for stat strings

Commit 826cfe7897ff ("i40e: use WARN_ONCE to replace the commented
BUG_ON size check") introduced a warning check to make sure
that the size of the stat strings was always the expected value. This
code accidentally inverted the check of the data pointer. Fix this so
that we accurately count the size of the stats we copied in.

This fixes an erroneous WARN kernel splat that occurs when requesting
ethtool statistics.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Tested-by: Mauro S M Rodrigues <maurosr@linux.vnet.ibm.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c