From: Thierry Herbelot Date: Mon, 24 May 2021 09:37:54 +0000 (+0200) Subject: net/pfe: remove unnecessary null check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=01bfb518a39b91da7896abe579bcf72d06935bf5;p=dpdk.git net/pfe: remove unnecessary null check 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 Acked-by: Gagandeep Singh --- diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 3135466713..feec4d10a2 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -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));