]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[TCP]: No need to check afinfo != NULL in tcp_proc_(un)register.
authorDenis V. Lunev <den@openvz.org>
Mon, 14 Apr 2008 05:11:46 +0000 (22:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Apr 2008 05:11:46 +0000 (22:11 -0700)
tcp_proc_register/tcp_proc_unregister are called with a static pointer only.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_ipv4.c

index 86148cdfb21f417f5d020d6a59aff834632074e4..978d9db1df3498c549af4cfdc6ffa77c1ee18be0 100644 (file)
@@ -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));
 }