summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorDavidlohr Bueso <davidlohr@hp.com>2014-01-27 17:07:08 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-27 21:02:40 -0800
commit8dc5cd04f97b5d6cad64df1e7dc5c49110b4d5e3 (patch)
treed2576a46ef38f8f3dbb8fdef98e922812f3d2837 /ipc
parent95d4eb2822d5d67fb14197d90d3e4d4146671cfb (diff)
downloadtalos-obmc-linux-8dc5cd04f97b5d6cad64df1e7dc5c49110b4d5e3.tar.gz
talos-obmc-linux-8dc5cd04f97b5d6cad64df1e7dc5c49110b4d5e3.zip
ipc: simplify sysvipc_proc_open() return
Get rid of silly/useless label jumping. Signed-off-by: Davidlohr Bueso <davidlohr@hp.com> Cc: Aswin Chandramouleeswaran <aswin@hp.com> Cc: Rik van Riel <riel@redhat.com> Acked-by: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/util.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ipc/util.c b/ipc/util.c
index 7afe7def52cf..cecb46e89ab0 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -911,8 +911,10 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file)
goto out;
ret = seq_open(file, &sysvipc_proc_seqops);
- if (ret)
- goto out_kfree;
+ if (ret) {
+ kfree(iter);
+ goto out;
+ }
seq = file->private_data;
seq->private = iter;
@@ -921,9 +923,6 @@ static int sysvipc_proc_open(struct inode *inode, struct file *file)
iter->ns = get_ipc_ns(current->nsproxy->ipc_ns);
out:
return ret;
-out_kfree:
- kfree(iter);
- goto out;
}
static int sysvipc_proc_release(struct inode *inode, struct file *file)
OpenPOWER on IntegriCloud