From mboxrd@z Thu Jan 1 00:00:00 1970 From: Namhyung Kim Subject: [PATCH 1/3] compat: remove unnecessary assignment in compat_rw_copy_check_uvector() Date: Mon, 27 Dec 2010 01:41:52 +0900 Message-ID: <1293381714-5264-1-git-send-email-namhyung@gmail.com> Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jeff Moyer To: Alexander Viro Return-path: Received: from mail-px0-f174.google.com ([209.85.212.174]:46309 "EHLO mail-px0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752294Ab0LZQmf (ORCPT ); Sun, 26 Dec 2010 11:42:35 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: *@ret_pointer is initialized to @fast_pointer thus the assignment is redundant. Signed-off-by: Namhyung Kim Cc: Jeff Moyer --- 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