]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/octeontx2/otx2_ethdev_ops.c
net/mlx5: fix meter policy flow match item
[dpdk.git] / drivers / net / octeontx2 / otx2_ethdev_ops.c
index 9e3f80937d5c9b833b08700318b1231de2fef296..5a4501208e9e33feb79c681246a30c63ea344c24 100644 (file)
@@ -453,7 +453,7 @@ otx2_nix_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
        rc = strlcpy(fw_version, (char *)dev->mkex_pfl_name, rc);
 
        rc += 1; /* Add the size of '\0' */
-       if (fw_size < (uint32_t)rc)
+       if (fw_size < (size_t)rc)
                return rc;
 
        return 0;
@@ -520,8 +520,7 @@ otx2_nix_get_module_eeprom(struct rte_eth_dev *eth_dev,
        struct otx2_eth_dev *dev = otx2_eth_pmd_priv(eth_dev);
        struct cgx_fw_data *rsp;
 
-       if (!info->data || !info->length ||
-           (info->offset + info->length > SFP_EEPROM_SIZE))
+       if (info->offset + info->length > SFP_EEPROM_SIZE)
                return -EINVAL;
 
        rsp = nix_get_fwdata(dev);