caif: Bugfix use for_each_safe when removing list nodes.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Sjur Brændeland and committed by
David S. Miller
0c184ed9 c968bdf6

+2 -2
+2 -2
net/caif/cfmuxl.c
··· 244 244 int phyid) 245 245 { 246 246 struct cfmuxl *muxl = container_obj(layr); 247 - struct list_head *node; 247 + struct list_head *node, *next; 248 248 struct cflayer *layer; 249 - list_for_each(node, &muxl->srvl_list) { 249 + list_for_each_safe(node, next, &muxl->srvl_list) { 250 250 layer = list_entry(node, struct cflayer, node); 251 251 if (cfsrvl_phyid_match(layer, phyid)) 252 252 layer->ctrlcmd(layer, ctrl, phyid);