[dpdk-dev] [PATCH 4/6] i40e: fix problematic dereference
Helin Zhang
helin.zhang at intel.com
Thu Apr 21 05:42:55 CEST 2016
Fix issue reported by Coverity.
Coverity ID 13299: Dereference before null check.
Fixes: 4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Helin Zhang <helin.zhang at intel.com>
---
drivers/net/i40e/i40e_pf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 5afd61a..3ec8f7c 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -913,7 +913,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
/* AdminQ will pass absolute VF id, transfer to internal vf id */
uint16_t vf_id = abs_vf_id - hw->func_caps.vf_base_id;
- if (!dev || vf_id > pf->vf_num - 1 || !pf->vfs) {
+ if (vf_id > pf->vf_num - 1 || !pf->vfs) {
PMD_DRV_LOG(ERR, "invalid argument");
return;
}
--
2.5.0
More information about the dev
mailing list