summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCongwen Zhang <zhang.congwen@zte.com.cn>2019-08-08 08:37:20 +0800
committerThomas Monjalon <thomas@monjalon.net>2019-08-08 16:55:19 +0200
commit1861e3a66ffb7fa33e7767649c7091f1900c8808 (patch)
treed29ca2b0a89e812a9ae9532b229bfe99ef7295f5
parent4dec9c79c2d76e08b3951a91137bb8622a465675 (diff)
downloaddpdk-1861e3a66ffb7fa33e7767649c7091f1900c8808.zip
dpdk-1861e3a66ffb7fa33e7767649c7091f1900c8808.tar.gz
dpdk-1861e3a66ffb7fa33e7767649c7091f1900c8808.tar.xz
net/ixgbe/base: fix product version check
The "and" condition offset == 0 && offset == NVM_INVALID_PTR can never be true. Fixes: cf3af5aa56c9 ("net/ixgbe/base: add functions to get version info") Cc: stable@dpdk.org 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 */