summaryrefslogtreecommitdiffstats
path: root/drivers
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 23:47:05 +0200
commitb5c8c8906e425f71efb83291c3837e4b78b769ea (patch)
treea9c12985a5f834cb314ed0d3851cf935eaad703f /drivers
parentgianfar: correct filer table writing (diff)
downloadlinux-b5c8c8906e425f71efb83291c3837e4b78b769ea.tar.xz
linux-b5c8c8906e425f71efb83291c3837e4b78b769ea.zip
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>
Diffstat (limited to 'drivers')
-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);