[PATCH 1/3] compat: remove unnecessary assignment in compat_rw_copy_check_uvector()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Namhyung Kim
Date: Sunday, December 26, 2010 - 9:41 am

*@ret_pointer is initialized to @fast_pointer thus the assignment is
redundant.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
---
 fs/compat.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/fs/compat.c b/fs/compat.c
index b074e9f79148..0a22f973f4b5 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;
 
-- 
1.7.3.4.600.g982838b0

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/3] compat: remove unnecessary assignment in compa ..., Namhyung Kim, (Sun Dec 26, 9:41 am)
Re: [PATCH 3/3] compat: copy missing fields in compat_stat ..., Christoph Hellwig, (Mon Dec 27, 8:36 am)