diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2006-11-22 20:26:11 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-11-25 15:16:49 -0800 |
commit | ac16ca6412d9feb5b2f8fc76a4ed938b5d107f94 (patch) | |
tree | 484df8ddb3e1f4cfe9e113e7b914c294300830fc /net/ipv4 | |
parent | 753eab76a3337863a0d86ce045fa4eb6c3cbeef9 (diff) | |
download | kernel_samsung_smdk4412-ac16ca6412d9feb5b2f8fc76a4ed938b5d107f94.zip kernel_samsung_smdk4412-ac16ca6412d9feb5b2f8fc76a4ed938b5d107f94.tar.gz kernel_samsung_smdk4412-ac16ca6412d9feb5b2f8fc76a4ed938b5d107f94.tar.bz2 |
[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/ipv4')
-rw-r--r-- | net/ipv4/tcp_probe.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_probe.c b/net/ipv4/tcp_probe.c index 4be336f..f230eee 100644 --- a/net/ipv4/tcp_probe.c +++ b/net/ipv4/tcp_probe.c @@ -156,6 +156,8 @@ static __init int tcpprobe_init(void) init_waitqueue_head(&tcpw.wait); spin_lock_init(&tcpw.lock); tcpw.fifo = kfifo_alloc(bufsize, GFP_KERNEL, &tcpw.lock); + if (IS_ERR(tcpw.fifo)) + return PTR_ERR(tcpw.fifo); if (!proc_net_fops_create(procname, S_IRUSR, &tcpprobe_fops)) goto err0; |