DPDK patches and discussions
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [RFC 2/4] enic: fix assignment
Date: Tue, 26 Sep 2017 14:53:27 -0400	[thread overview]
Message-ID: <20170926185329.2776-3-aconole@redhat.com> (raw)
In-Reply-To: <20170926185329.2776-1-aconole@redhat.com>

As it stands, the existing assingment to mbuf has no effect outside of
the function.  Prior to this change, the mbuf argument would contain
an invalid address, but it would not be null.  After this change, the
caller gets a null mbuf back.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 drivers/net/enic/enic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 40dbec7..ff8e4c5 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -224,7 +224,7 @@ enic_free_rq_buf(struct rte_mbuf **mbuf)
 		return;
 
 	rte_pktmbuf_free(*mbuf);
-	mbuf = NULL;
+	*mbuf = NULL;
 }
 
 void enic_init_vnic_resources(struct enic *enic)
-- 
2.9.5

  parent reply	other threads:[~2017-09-26 18:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26 18:53 [dpdk-dev] [RFC 0/4] misc enic fixes Aaron Conole
2017-09-26 18:53 ` [dpdk-dev] [RFC 1/4] enic: update format string to match arg types Aaron Conole
2017-10-10 17:30   ` John Daley (johndale)
2017-09-26 18:53 ` Aaron Conole [this message]
2017-10-10 17:31   ` [dpdk-dev] [RFC 2/4] enic: fix assignment John Daley (johndale)
2017-09-26 18:53 ` [dpdk-dev] [RFC 3/4] enic: remove unused code Aaron Conole
2017-10-10 17:31   ` John Daley (johndale)
2017-09-26 18:53 ` [dpdk-dev] [RFC 4/4] enic: remove anscillary assignment Aaron Conole
2017-10-10 17:32   ` John Daley (johndale)
2017-10-03 16:16 ` [dpdk-dev] [RFC 0/4] misc enic fixes Ferruh Yigit
2017-10-09 14:00   ` Aaron Conole
2017-10-10 23:06 ` Ferruh Yigit

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=20170926185329.2776-3-aconole@redhat.com \
    --to=aconole@redhat.com \
    --cc=dev@dpdk.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).