[dpdk-stable] [PATCH v2] net/pfe: no need to check dev to be NULL Pointer
Gagandeep Singh
G.Singh at nxp.com
Mon May 24 12:28:37 CEST 2021
> -----Original Message-----
> From: Thierry Herbelot <thierry.herbelot at 6wind.com>
> Sent: Monday, May 24, 2021 3:08 PM
> To: dev at dpdk.org
> Cc: Thierry Herbelot <thierry.herbelot at 6wind.com>; Thomas Monjalon
> <thomas at monjalon.net>; stable at dpdk.org; Gagandeep Singh
> <G.Singh at nxp.com>
> Subject: [PATCH v2] net/pfe: no need to check dev to be NULL Pointer
>
> librte_ethdev library is already doing some checks on dev before calling
> the link update.
>
> Fixes: acd4818ea2a45 ("net/pfe: add link status update")
> Cc: stable at dpdk.org
> Cc: Gagandeep Singh <g.singh at nxp.com>
>
> Signed-off-by: Thierry Herbelot <thierry.herbelot at 6wind.com>
> --
> V2: rework after noting dev cannot be NULL
> ---
Acked-by: Gagandeep Singh <G.singh at nxp.com>
> drivers/net/pfe/pfe_ethdev.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c
> index 3135466713fb..feec4d10a26e 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));
>
> --
> 2.29.2
More information about the stable
mailing list