Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95887
b: refs/heads/master
c: 84841c3
h: refs/heads/master
i:
  95885: 01a41e8
  95883: 3c5ebf6
  95879: 33aa6c0
  95871: 0260f68
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed May 2, 2008
1 parent 961b3d9 commit 21815fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d3faa390df9f009d7d76134b2aa1f07990945a4
refs/heads/master: 84841c3c6cf2ed9a8e0dfd842fb35ef6e2bce091
10 changes: 3 additions & 7 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -2214,9 +2214,6 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
struct tcp_iter_state *s;
int err;

if (unlikely(afinfo == NULL))
return -EINVAL;

err = seq_open_net(inode, file, &afinfo->seq_ops,
sizeof(struct tcp_iter_state));
if (err < 0)
Expand All @@ -2241,10 +2238,9 @@ int tcp_proc_register(struct net *net, struct tcp_seq_afinfo *afinfo)
afinfo->seq_ops.next = tcp_seq_next;
afinfo->seq_ops.stop = tcp_seq_stop;

p = proc_net_fops_create(net, afinfo->name, S_IRUGO, &afinfo->seq_fops);
if (p)
p->data = afinfo;
else
p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net,
&afinfo->seq_fops, afinfo);
if (!p)
rc = -ENOMEM;
return rc;
}
Expand Down
7 changes: 3 additions & 4 deletions trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1605,10 +1605,9 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
afinfo->seq_ops.next = udp_seq_next;
afinfo->seq_ops.stop = udp_seq_stop;

p = proc_net_fops_create(net, afinfo->name, S_IRUGO, &afinfo->seq_fops);
if (p)
p->data = afinfo;
else
p = proc_create_data(afinfo->name, S_IRUGO, net->proc_net,
&afinfo->seq_fops, afinfo);
if (!p)
rc = -ENOMEM;
return rc;
}
Expand Down

0 comments on commit 21815fa

Please sign in to comment.