From: Denis V. Lunev Date: Mon, 14 Apr 2008 05:11:46 +0000 (-0700) Subject: [TCP]: No need to check afinfo != NULL in tcp_proc_(un)register. X-Git-Tag: v2.6.26-rc1~1138^2~117 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1abf4fb20d38cf58c92b27f4d6ad4fa92a3bb553;p=platform%2Fkernel%2Flinux-3.10.git [TCP]: No need to check afinfo != NULL in tcp_proc_(un)register. tcp_proc_register/tcp_proc_unregister are called with a static pointer only. Signed-off-by: Denis V. Lunev Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 86148cd..978d9db 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -2263,8 +2263,6 @@ int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo) int rc = 0; struct proc_dir_entry *p; - if (!afinfo) - return -EINVAL; afinfo->seq_fops->owner = afinfo->owner; afinfo->seq_fops->open = tcp_seq_open; afinfo->seq_fops->read = seq_read; @@ -2281,8 +2279,6 @@ int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo) void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo) { - if (!afinfo) - return; proc_net_remove(net, afinfo->name); memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); }