]> Pileus Git - ~andy/linux/commitdiff
caif: Bugfix use for_each_safe when removing list nodes.
authorSjur Brændeland <sjur.brandeland@stericsson.com>
Mon, 11 Apr 2011 10:11:29 +0000 (10:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2011 20:15:57 +0000 (13:15 -0700)
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/caif/cfmuxl.c

index 46f34b2e04784d8fd379384851c3d5b19377ddee..24f1ffa74b06dbc17a751eef251f1c73f111d064 100644 (file)
@@ -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);