summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCongwen Zhang <zhang.congwen@zte.com.cn>2019-08-08 08:37:20 +0800
committerKevin Traynor <ktraynor@redhat.com>2019-09-13 10:37:20 +0100
commit221f066b8bb098925e0f939159666e1c6477c15a (patch)
tree5f0322b63a3917ec436566ffee4d0e6ef822806c
parent674a7051518386ae4e9c708410c0eb85897701af (diff)
downloaddpdk-stable-221f066b8bb098925e0f939159666e1c6477c15a.zip
dpdk-stable-221f066b8bb098925e0f939159666e1c6477c15a.tar.gz
dpdk-stable-221f066b8bb098925e0f939159666e1c6477c15a.tar.xz
net/ixgbe/base: fix product version check
[ upstream commit 1861e3a66ffb7fa33e7767649c7091f1900c8808 ] The "and" condition offset == 0 && offset == NVM_INVALID_PTR can never be true. Fixes: cf3af5aa56c9 ("net/ixgbe/base: add functions to get version info") Signed-off-by: Congwen Zhang <zhang.congwen@zte.com.cn> Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
-rw-r--r--drivers/net/ixgbe/base/ixgbe_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c
index fb50719..62ff767 100644
--- a/drivers/net/ixgbe/base/ixgbe_common.c
+++ b/drivers/net/ixgbe/base/ixgbe_common.c
@@ -5040,7 +5040,7 @@ void ixgbe_get_oem_prod_version(struct ixgbe_hw *hw,
hw->eeprom.ops.read(hw, NVM_OEM_PROD_VER_PTR, &offset);
/* Return is offset to OEM Product Version block is invalid */
- if (offset == 0x0 && offset == NVM_INVALID_PTR)
+ if (offset == 0x0 || offset == NVM_INVALID_PTR)
return;
/* Read product version block */