From: Namhyung Kim Date: Sun, 26 Dec 2010 16:41:52 +0000 (+0900) Subject: compat: remove unnecessary assignment in compat_rw_copy_check_uvector() X-Git-Tag: firefly_0821_release~7613^2~2668^2~5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6a5640f10255a8941a3a57396dda20af7a5c9a9e;p=firefly-linux-kernel-4.4.55.git compat: remove unnecessary assignment in compat_rw_copy_check_uvector() *@ret_pointer is initialized to @fast_pointer thus the assignment is redundant. Signed-off-by: Namhyung Kim Cc: Jeff Moyer Signed-off-by: Al Viro --- diff --git a/fs/compat.c b/fs/compat.c index eb1740ac8c0a..d717442c4133 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -597,10 +597,8 @@ ssize_t compat_rw_copy_check_uvector(int type, if (nr_segs > fast_segs) { ret = -ENOMEM; iov = kmalloc(nr_segs*sizeof(struct iovec), GFP_KERNEL); - if (iov == NULL) { - *ret_pointer = fast_pointer; + if (iov == NULL) goto out; - } } *ret_pointer = iov;