X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Focteontx2%2Fotx2_ethdev_ops.c;h=5a4501208e9e33feb79c681246a30c63ea344c24;hb=4f74cb68b96496acce845e75b5533f019f248b1e;hp=9e3f80937d5c9b833b08700318b1231de2fef296;hpb=fb7ad441d43d4152cb7bde992a1136c20d9166e9;p=dpdk.git diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c index 9e3f80937d..5a4501208e 100644 --- a/drivers/net/octeontx2/otx2_ethdev_ops.c +++ b/drivers/net/octeontx2/otx2_ethdev_ops.c @@ -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);