net/ixgbe: fix coverity issue

Message ID 20200210041525.50893-1-guinanx.sun@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series net/ixgbe: fix coverity issue |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation fail apply issues

Commit Message

Guinan Sun Feb. 10, 2020, 4:15 a.m. UTC
This patch fixes (Logically dead code) coverity issue.

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

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/ixgbe/ixgbe_pf.c | 3 ---
 1 file changed, 3 deletions(-)
  

Comments

Xiaolong Ye Feb. 10, 2020, 6:57 a.m. UTC | #1
On 02/10, Guinan Sun wrote:
>This patch fixes (Logically dead code) coverity issue.
>
>Coverity issue: 353613
>Fixes: 3c4270187518 ("net/ixgbe: support VF MAC address add/remove")
>
>Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
>---
> drivers/net/ixgbe/ixgbe_pf.c | 3 ---
> 1 file changed, 3 deletions(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
>index 493f0f2b9..afae21f81 100644
>--- a/drivers/net/ixgbe/ixgbe_pf.c
>+++ b/drivers/net/ixgbe/ixgbe_pf.c
>@@ -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);
>-- 
>2.17.1
>

Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>

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

Patch

diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 493f0f2b9..afae21f81 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -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);