aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r--net/ipv6/raw.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index bdd0974e6775..ca24ef19cd8f 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -1289,21 +1289,8 @@ static const struct seq_operations raw6_seq_ops = {
1289 1289
1290static int raw6_seq_open(struct inode *inode, struct file *file) 1290static int raw6_seq_open(struct inode *inode, struct file *file)
1291{ 1291{
1292 struct seq_file *seq; 1292 return seq_open_private(file, &raw6_seq_ops,
1293 int rc = -ENOMEM; 1293 sizeof(struct raw6_iter_state));
1294 struct raw6_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL);
1295 if (!s)
1296 goto out;
1297 rc = seq_open(file, &raw6_seq_ops);
1298 if (rc)
1299 goto out_kfree;
1300 seq = file->private_data;
1301 seq->private = s;
1302out:
1303 return rc;
1304out_kfree:
1305 kfree(s);
1306 goto out;
1307} 1294}
1308 1295
1309static const struct file_operations raw6_seq_fops = { 1296static const struct file_operations raw6_seq_fops = {