From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Conole Subject: [RFC 2/4] enic: fix assignment Date: Tue, 26 Sep 2017 14:53:27 -0400 Message-ID: <20170926185329.2776-3-aconole@redhat.com> References: <20170926185329.2776-1-aconole@redhat.com> To: dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D08971B1B3 for ; Tue, 26 Sep 2017 20:53:46 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 343145F7A6 for ; Tue, 26 Sep 2017 18:53:46 +0000 (UTC) Received: from dhcp-25-97.bos.redhat.com (ovpn-122-85.rdu2.redhat.com [10.10.122.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DB6A69723 for ; Tue, 26 Sep 2017 18:53:44 +0000 (UTC) In-Reply-To: <20170926185329.2776-1-aconole@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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