> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Monday, January 24, 2022 5:47 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <step...@networkplumber.org>; Zhang, Roy Fan
> <roy.fan.zh...@intel.com>; Ashish Gupta <ashish.gu...@marvell.com>
> Subject: [PATCH v2 77/83] compressdev: remove unnecessary NULL checks
> 
> Remove redundant NULL pointer checks before free functions
> found by nullfree.cocci
> 
> Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
> ---
>  lib/compressdev/rte_compressdev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/lib/compressdev/rte_compressdev.c
> b/lib/compressdev/rte_compressdev.c
> index 2e9218af68f6..d4f7d4d3daf2 100644
> --- a/lib/compressdev/rte_compressdev.c
> +++ b/lib/compressdev/rte_compressdev.c
> @@ -405,8 +405,7 @@ rte_compressdev_queue_pairs_release(struct
> rte_compressdev *dev)
>                       return ret;
>       }
> 
> -     if (dev->data->queue_pairs != NULL)
> -             rte_free(dev->data->queue_pairs);
> +     rte_free(dev->data->queue_pairs);
>       dev->data->queue_pairs = NULL;
>       dev->data->nb_queue_pairs = 0;
> 
> --
> 2.30.2
Acked-by: Fan Zhang <roy.fan.zh...@intel.com>

Reply via email to