From: WANG Cong Date: Wed, 15 Apr 2015 18:48:49 +0000 (-0700) Subject: fou: avoid missing unlock in failure path X-Git-Tag: v4.1-rc1~95^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=540207ae69777b85d167df28f469e77f0fcbb8f9;p=platform%2Fkernel%2Flinux-exynos.git fou: avoid missing unlock in failure path Fixes: 7a6c8c34e5b7 ("fou: implement FOU_CMD_GET") Reported-by: Dan Carpenter Cc: Dan Carpenter Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c index af150b4..34968cd 100644 --- a/net/ipv4/fou.c +++ b/net/ipv4/fou.c @@ -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; }