net/pfe: remove unnecessary null check
authorThierry Herbelot <thierry.herbelot@6wind.com>
Mon, 24 May 2021 09:37:54 +0000 (11:37 +0200)
committerAndrew Rybchenko <Andrew.Rybchenko@oktetlabs.ru>
Fri, 2 Jul 2021 17:03:03 +0000 (19:03 +0200)
ethdev library does the check of dev before calling the link update.

Fixes: acd4818ea2a45 ("net/pfe: add link status update")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Gagandeep Singh <g.singh@nxp.com>
drivers/net/pfe/pfe_ethdev.c

index 3135466..feec4d1 100644 (file)
@@ -582,11 +582,6 @@ pfe_eth_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused)
        struct rte_eth_link link, old;
        unsigned int lstatus = 1;
 
-       if (dev == NULL) {
-               PFE_PMD_ERR("Invalid device in link_update.\n");
-               return 0;
-       }
-
        memset(&old, 0, sizeof(old));
        memset(&link, 0, sizeof(struct rte_eth_link));