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>
This commit is contained in:
Jakub Kicinski 2015-08-12 02:41:56 +02:00 committed by David S. Miller
parent a898fe040f
commit b5c8c8906e

View 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);