diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 86148cdfb21f..978d9db1df34 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) | |||
2263 | int rc = 0; | 2263 | int rc = 0; |
2264 | struct proc_dir_entry *p; | 2264 | struct proc_dir_entry *p; |
2265 | 2265 | ||
2266 | if (!afinfo) | ||
2267 | return -EINVAL; | ||
2268 | afinfo->seq_fops->owner = afinfo->owner; | 2266 | afinfo->seq_fops->owner = afinfo->owner; |
2269 | afinfo->seq_fops->open = tcp_seq_open; | 2267 | afinfo->seq_fops->open = tcp_seq_open; |
2270 | afinfo->seq_fops->read = seq_read; | 2268 | afinfo->seq_fops->read = seq_read; |
@@ -2281,8 +2279,6 @@ int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo) | |||
2281 | 2279 | ||
2282 | void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo) | 2280 | void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo) |
2283 | { | 2281 | { |
2284 | if (!afinfo) | ||
2285 | return; | ||
2286 | proc_net_remove(net, afinfo->name); | 2282 | proc_net_remove(net, afinfo->name); |
2287 | memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); | 2283 | memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); |
2288 | } | 2284 | } |