Date: Fri, 21 Aug 2020 19:34:41 +0000 (UTC) From: Eric van Gyzen <vangyzen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364462 - head/sys/dev/ixgbe Message-ID: <202008211934.07LJYfK3085358@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vangyzen Date: Fri Aug 21 19:34:41 2020 New Revision: 364462 URL: https://svnweb.freebsd.org/changeset/base/364462 Log: 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 Modified: head/sys/dev/ixgbe/ixgbe_common.c Modified: head/sys/dev/ixgbe/ixgbe_common.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe_common.c Fri Aug 21 19:28:26 2020 (r364461) +++ head/sys/dev/ixgbe/ixgbe_common.c Fri Aug 21 19:34:41 2020 (r364462) @@ -5147,8 +5147,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?202008211934.07LJYfK3085358>