Commit 0c184ed9 authored by Sjur Brændeland's avatar Sjur Brændeland Committed by David S. Miller

caif: Bugfix use for_each_safe when removing list nodes.

Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c968bdf6
...@@ -244,9 +244,9 @@ static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl, ...@@ -244,9 +244,9 @@ static void cfmuxl_ctrlcmd(struct cflayer *layr, enum caif_ctrlcmd ctrl,
int phyid) int phyid)
{ {
struct cfmuxl *muxl = container_obj(layr); struct cfmuxl *muxl = container_obj(layr);
struct list_head *node; struct list_head *node, *next;
struct cflayer *layer; 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); layer = list_entry(node, struct cflayer, node);
if (cfsrvl_phyid_match(layer, phyid)) if (cfsrvl_phyid_match(layer, phyid))
layer->ctrlcmd(layer, ctrl, phyid); layer->ctrlcmd(layer, ctrl, phyid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment