summaryrefslogtreecommitdiffstats
path: root/net/dccp/probe.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-11-23 05:26:11 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2006-11-26 00:16:49 +0100
commitac16ca6412d9feb5b2f8fc76a4ed938b5d107f94 (patch)
tree484df8ddb3e1f4cfe9e113e7b914c294300830fc /net/dccp/probe.c
parent[UDP]: Make udp_encap_rcv use pskb_may_pull (diff)
downloadlinux-ac16ca6412d9feb5b2f8fc76a4ed938b5d107f94.tar.xz
linux-ac16ca6412d9feb5b2f8fc76a4ed938b5d107f94.zip
[NET]: Fix kfifo_alloc() error check.
The return value of kfifo_alloc() should be checked by IS_ERR(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/probe.c')
-rw-r--r--net/dccp/probe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index 146496fce2e2..fded1493c1dc 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -160,6 +160,8 @@ static __init int dccpprobe_init(void)
init_waitqueue_head(&dccpw.wait);
spin_lock_init(&dccpw.lock);
dccpw.fifo = kfifo_alloc(bufsize, GFP_KERNEL, &dccpw.lock);
+ if (IS_ERR(dccpw.fifo))
+ return PTR_ERR(dccpw.fifo);
if (!proc_net_fops_create(procname, S_IRUSR, &dccpprobe_fops))
goto err0;