netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <moorray3@wp.pl>
To: "David S. Miller" <davem@davemloft.net>,
	Claudiu Manoil <claudiu.manoil@freescale.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kubakici@wp.pl>
Subject: [PATCHv2 2/3] gianfar: correct list membership accounting
Date: Wed, 12 Aug 2015 02:41:56 +0200	[thread overview]
Message-ID: <1439340117-25314-3-git-send-email-moorray3@wp.pl> (raw)
In-Reply-To: <1439340117-25314-1-git-send-email-moorray3@wp.pl>

From: Jakub Kicinski <kubakici@wp.pl>

At a cost of one line let's make sure .count is correct
when calling gfar_process_filer_changes().

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
---
v2: no change
---
 drivers/net/ethernet/freescale/gianfar_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index e543d3b01838..b955ed83ca98 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -1723,13 +1723,14 @@ static int gfar_add_cls(struct gfar_private *priv,
 	}
 
 process:
+	priv->rx_list.count++;
 	ret = gfar_process_filer_changes(priv);
 	if (ret)
 		goto clean_list;
-	priv->rx_list.count++;
 	return ret;
 
 clean_list:
+	priv->rx_list.count--;
 	list_del(&temp->list);
 clean_mem:
 	kfree(temp);
-- 
2.1.0

  parent reply	other threads:[~2015-08-12  0:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10 20:12 [PATCH 0/3] gianfar: filer changes Jakub Kicinski
2015-08-10 20:12 ` [PATCH 1/3] gianfar: correct filer table writing Jakub Kicinski
2015-08-10 20:12 ` [PATCH 2/3] gianfar: correct list membership accounting Jakub Kicinski
2015-08-10 20:12 ` [PATCH 3/3] gianfar: remove faulty filer optimizer Jakub Kicinski
2015-08-11 14:00   ` Manoil Claudiu
2015-08-11 14:51     ` Jakub Kiciński
2015-08-11 18:41       ` David Miller
2015-08-12  0:41 ` [PATCHv2 0/3] gianfar: filer changes Jakub Kicinski
2015-08-12  0:41   ` [PATCHv2 1/3] gianfar: correct filer table writing Jakub Kicinski
2015-08-12  0:41   ` Jakub Kicinski [this message]
2015-08-12  0:41   ` [PATCHv2 3/3] gianfar: remove faulty filer optimizer Jakub Kicinski
2015-08-12 11:50     ` Manoil Claudiu
2015-08-12 21:48   ` [PATCHv2 0/3] gianfar: filer changes David Miller

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=1439340117-25314-3-git-send-email-moorray3@wp.pl \
    --to=moorray3@wp.pl \
    --cc=claudiu.manoil@freescale.com \
    --cc=davem@davemloft.net \
    --cc=kubakici@wp.pl \
    --cc=netdev@vger.kernel.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).