ixgbe: Fix && vs || typo
authorDan Carpenter <[email protected]>
Thu, 11 Jan 2018 21:46:01 +0000 (00:46 +0300)
committerJeff Kirsher <[email protected]>
Fri, 26 Jan 2018 18:25:32 +0000 (10:25 -0800)
"offset" can't be both 0x0 and 0xFFFF so presumably || was intended
instead of &&.  That matches with how this check is done in other
functions.

Fixes: 73834aec7199 ("ixgbe: extend firmware version support")
Signed-off-by: Dan Carpenter <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

index 7ac7ef9b37ffc21be8549f8aca4a031351c8f1ce..61188f343955106e96fa0b3af4e3984f9d935e4f 100644 (file)
@@ -4087,7 +4087,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 */