Skip to content

Commit

Permalink
caif: Bugfix use for_each_safe when removing list nodes.
Browse files Browse the repository at this point in the history
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sjur Brændeland authored and David S. Miller committed Apr 11, 2011
1 parent c968bdf commit 0c184ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/caif/cfmuxl.c
Original file line number Diff line number Diff line change
@@ -244,9 +244,9 @@ static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid)
{
struct cfmuxl *muxl = container_obj(layr);
struct list_head *node;
struct list_head *node, *next;
struct cflayer *layer;
list_for_each(node, &muxl->srvl_list) {
list_for_each_safe(node, next, &muxl->srvl_list) {
layer = list_entry(node, struct cflayer, node);
if (cfsrvl_phyid_match(layer, phyid))
layer->ctrlcmd(layer, ctrl, phyid);

0 comments on commit 0c184ed

Please sign in to comment.