DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "kai.ji@intel.com" <kai.ji@intel.com>,
	Pablo de Lara <pablo.de.lara.guarch@intel.com>,
	Ciara Power <ciara.power@intel.com>
Subject: RE: [EXT] [PATCH] ipsec: remove unneccessary null check
Date: Tue, 31 Jan 2023 08:17:50 +0000	[thread overview]
Message-ID: <CO6PR18MB448444CBAFBBCB2B55F7CB6ED8D09@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20230113184426.68063-1-stephen@networkplumber.org>

> Subject: [EXT] [PATCH] ipsec: remove unneccessary null check
Changed subject to crypto/ipsec_mb: remove unnecessary null check

Fixed couple of spellings in description and title.

Applied to dpdk-next-crypto

Thanks.
> 
> The function rte_ring_free() accepts NULL as vaild input
> like free() and other functions.
> 
> Found with null_free_check.cocci.
> 
> Fixes: 16d6ebb65d59 ("crypto/ipsec_mb: fix null checks")
> Cc: kai.ji@intel.com
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
> b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
> index 71e02cd0513d..3e52f9567401 100644
> --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
> +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
> @@ -139,15 +139,12 @@ int
>  ipsec_mb_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
>  {
>  	struct ipsec_mb_qp *qp = dev->data->queue_pairs[qp_id];
> -	struct rte_ring *r = NULL;
> 
>  	if (!qp)
>  		return 0;
> 
>  	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
> -		r = rte_ring_lookup(qp->name);
> -		if (r)
> -			rte_ring_free(r);
> +		rte_ring_free(rte_ring_lookup(qp->name));
> 
>  #if IMB_VERSION(1, 1, 0) > IMB_VERSION_NUM
>  		if (qp->mb_mgr)
> --
> 2.39.0


      parent reply	other threads:[~2023-01-31  8:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 18:44 Stephen Hemminger
2023-01-13 19:04 ` Tyler Retzlaff
2023-01-16  9:16 ` Zhang, Fan
2023-01-16 23:28 ` Ji, Kai
2023-01-31  8:17 ` Akhil Goyal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO6PR18MB448444CBAFBBCB2B55F7CB6ED8D09@CO6PR18MB4484.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=kai.ji@intel.com \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).