svn commit: r364462 - head/sys/dev/ixgbe

Eric van Gyzen vangyzen at FreeBSD.org
Fri Aug 21 19:34:42 UTC 2020


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 at 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 */


More information about the svn-src-all mailing list