]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
gianfar: correct list membership accounting
authorJakub Kicinski <kubakici@wp.pl>
Wed, 12 Aug 2015 00:41:56 +0000 (02:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Aug 2015 21:47:05 +0000 (14:47 -0700)
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>
drivers/net/ethernet/freescale/gianfar_ethtool.c

index 4a710f3eb5ebc96318a1f0a2f1c43f8d5a8a2884..f477b67730bb8186bc6c3089ce365aa60bba65d0 100644 (file)
@@ -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);