Skip to contentSkip to conversation

net/ixgbe: fix coverity issue

PATCH Applied Guinan Sun 2 participants 2 messages Feb 10, 2020 Network drivers

lore
Share & tools
lore

Guinan Sun

author
#0 lore raw

PATCH 1/1 net/ixgbe: fix coverity issue

This patch fixes (Logically dead code) coverity issue.

Coverity issue: 353613

Fixes 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
---
 drivers/net/ixgbe/ixgbe_pf.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/ixgbe/ixgbe_pf.c +0 -3
index 493f0f2b9..afae21f81 100644
@@ -772,9 +772,6 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 		    IXGBE_VT_MSGINFO_SHIFT;
 
 	if (index) {
-		if (new_mac == NULL)
-			return -1;
-
 		if (!rte_is_valid_assigned_ether_addr(
 			(struct rte_ether_addr *)new_mac)) {
 			PMD_DRV_LOG(ERR, "set invalid mac vf:%d\n", vf);
Signature · 1 line
2.17.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 27 lines · Guinan Sun

This patch fixes (Logically dead code) coverity issue.

Coverity issue: 353613

Fixes 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")

---
drivers/net/ixgbe/ixgbe_pf.c | 3 ---

1 file changed, 3 deletions(-)
drivers/net/ixgbe/ixgbe_pf.c +0 -3
index 493f0f2b9..afae21f81 100644
@@ -772,9 +772,6 @@ ixgbe_set_vf_macvlan_msg(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 		    IXGBE_VT_MSGINFO_SHIFT;
 
 	if (index) {
-		if (new_mac == NULL)
-			return -1;
-
 		if (!rte_is_valid_assigned_ether_addr(
 			(struct rte_ether_addr *)new_mac)) {
 			PMD_DRV_LOG(ERR, "set invalid mac vf:%d\n", vf);
Signature · 1 line
2.17.1

Applied to dpdk-next-net-intel, Thanks.