summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Kicinski <kubakici@wp.pl>2015-08-12 02:41:56 +0200
committerDavid S. Miller <davem@davemloft.net>2015-08-12 14:47:05 -0700
commitb5c8c8906e425f71efb83291c3837e4b78b769ea (patch)
treea9c12985a5f834cb314ed0d3851cf935eaad703f
parenta898fe040f62a32b90e26dc1f1b5973608054b29 (diff)
gianfar: correct list membership accounting
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/freescale/gianfar_ethtool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 4a710f3eb5eb..f477b67730bb 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -1721,13 +1721,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);