From: Kirill Korotaev Date: Mon, 9 Jan 2006 14:42:42 +0000 (+0300) Subject: [PATCH] netlink oops fix due to incorrect error code X-Git-Tag: v2.6.16-rc1~670 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14591de147f7c9656fa2b9c05680d2b46e286c40;p=linux-2.6 [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: Linus Torvalds --- diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 7849cac14d..a67f1b44c9 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);