fou: avoid missing unlock in failure path

Fixes: 7a6c8c34e5 ("fou: implement FOU_CMD_GET")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
WANG Cong 2015-04-15 11:48:49 -07:00 committed by David S. Miller
parent c3de6317d7
commit 540207ae69

View File

@ -711,11 +711,10 @@ static int fou_nl_dump(struct sk_buff *skb, struct netlink_callback *cb)
cb->nlh->nlmsg_seq, NLM_F_MULTI,
skb, FOU_CMD_GET);
if (ret)
goto done;
break;
}
mutex_unlock(&fn->fou_lock);
done:
cb->args[0] = idx;
return skb->len;
}