Skip to content

Commit

Permalink
gianfar: correct list membership accounting
Browse files Browse the repository at this point in the history
At a cost of one line let's make sure .count is correct
when calling gfar_process_filer_changes().

Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
kuba-moo authored and davem330 committed Aug 12, 2015
1 parent a898fe0 commit b5c8c89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/freescale/gianfar_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b5c8c89

Please sign in to comment.