From e7594b2f2389fab1558fed58507ad3ce7d4eae56 Mon Sep 17 00:00:00 2001 From: Kirill Korotaev Date: Mon, 9 Jan 2006 17:42:42 +0300 Subject: [PATCH] [PATCH] netlink oops fix due to incorrect error code Fixed oops after failed netlink socket creation. Wrong parathenses in if() statement caused err to be 1, instead of negative value. Trivial fix, not trivial to find though. Signed-Off-By: Dmitry Mishin Signed-Off-By: Kirill Korotaev Signed-off-by: Chris Wright --- net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 96020d7087e8..a002f2b686f2 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -402,7 +402,7 @@ static int netlink_create(struct socket *sock, int protocol) groups = nl_table[protocol].groups; netlink_unlock_table(); - if ((err = __netlink_create(sock, protocol) < 0)) + if ((err = __netlink_create(sock, protocol)) < 0) goto out_module; nlk = nlk_sk(sock->sk); -- 2.39.5