From: Davidlohr Bueso Date: Tue, 28 Jan 2014 01:07:08 +0000 (-0800) Subject: ipc: simplify sysvipc_proc_open() return X-Git-Tag: v3.14-rc1~79^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8dc5cd04f97b5d6cad64df1e7dc5c49110b4d5e3;p=platform%2Fkernel%2Flinux-exynos.git ipc: simplify sysvipc_proc_open() return Get rid of silly/useless label jumping. Signed-off-by: Davidlohr Bueso Cc: Aswin Chandramouleeswaran Cc: Rik van Riel Acked-by: Manfred Spraul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/ipc/util.c b/ipc/util.c index 7afe7de..cecb46e 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)