Date: Sun, 3 Oct 2021 05:04:25 GMT From: Kevin Bowling <kbowling@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 660b6999cc95 - stable/12 - ixgbe: fix impossible condition Message-ID: <202110030504.19354PE1095177@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=660b6999cc95aa56f5981c538234bd3475b3abc5 commit 660b6999cc95aa56f5981c538234bd3475b3abc5 Author: Eric van Gyzen <vangyzen@FreeBSD.org> AuthorDate: 2020-08-21 19:34:41 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-10-03 01:59:48 +0000 ixgbe: fix impossible condition Coverity flagged this condition: The condition offset == 0 && offset == 65535 can never be true because offset cannot be equal to two different values at the same time. Submitted by: bret_ketchum@dell.com Reported by: Coverity Reviewed by: tsoome, cem MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26144 (cherry picked from commit ab1c54fec66803235a8923333fa79f2cbfa33354) --- sys/dev/ixgbe/ixgbe_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/ixgbe/ixgbe_common.c b/sys/dev/ixgbe/ixgbe_common.c index d19f82bc3eab..50e18bcba997 100644 --- a/sys/dev/ixgbe/ixgbe_common.c +++ b/sys/dev/ixgbe/ixgbe_common.c @@ -5154,8 +5154,8 @@ void ixgbe_get_oem_prod_version(struct ixgbe_hw *hw, nvm_ver->oem_valid = false; 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) + /* Return if offset to OEM Product Version block is invalid */ + if (offset == 0x0 || offset == NVM_INVALID_PTR) return; /* Read product version block */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110030504.19354PE1095177>