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: MMI-PSA29.97-13-9~53399 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=14591de147f7c9656fa2b9c05680d2b46e286c40;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 7849cac14d3a..a67f1b44c9a3 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);