Commit 8dc5cd04 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Linus Torvalds

ipc: simplify sysvipc_proc_open() return

Get rid of silly/useless label jumping.
Signed-off-by: default avatarDavidlohr Bueso <davidlohr@hp.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: default avatarManfred Spraul <manfred@colorfullife.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 95d4eb28
...@@ -911,8 +911,10 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file) ...@@ -911,8 +911,10 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file)
goto out; goto out;
ret = seq_open(file, &sysvipc_proc_seqops); ret = seq_open(file, &sysvipc_proc_seqops);
if (ret) if (ret) {
goto out_kfree; kfree(iter);
goto out;
}
seq = file->private_data; seq = file->private_data;
seq->private = iter; seq->private = iter;
...@@ -921,9 +923,6 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file) ...@@ -921,9 +923,6 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file)
iter->ns = get_ipc_ns(current->nsproxy->ipc_ns); iter->ns = get_ipc_ns(current->nsproxy->ipc_ns);
out: out:
return ret; return ret;
out_kfree:
kfree(iter);
goto out;
} }
static int sysvipc_proc_release(struct inode *inode, struct file *file) static int sysvipc_proc_release(struct inode *inode, struct file *file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment