[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1439237540-11302-3-git-send-email-moorray3@wp.pl>
Date: Mon, 10 Aug 2015 22:12:19 +0200
From: Jakub Kicinski <moorray3@...pl>
To: "David S. Miller" <davem@...emloft.net>,
Claudiu Manoil <claudiu.manoil@...escale.com>
Cc: netdev@...r.kernel.org, Jakub Kicinski <kubakici@...pl>
Subject: [PATCH 2/3] gianfar: correct list membership accounting
From: Jakub Kicinski <kubakici@...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@...pl>
---
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists