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>
This commit is contained in:
Sjur Brændeland 2011-04-11 10:11:29 +00:00 committed by David S. Miller
parent c968bdf691
commit 0c184ed903
1 changed files with 2 additions and 2 deletions

View 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);