Commit 0c184ed9032c58b21f0d90de28c796874b73d6a1

Authored by Sjur Brændeland
Committed by David S. Miller
1 parent c968bdf691

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>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -244,9 +244,9 @@
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);