[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1384446782-13741-4-git-send-email-bergwolf@gmail.com>
Date: Fri, 15 Nov 2013 00:32:26 +0800
From: Peng Tao <bergwolf@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org,
Sebastien Buisson <sebastien.buisson@...l.net>,
Peng Tao <bergwolf@...il.com>,
Andreas Dilger <andreas.dilger@...el.com>
Subject: [PATCH 03/39] staging/lustre/build: fix 'deadcode' errors
From: Sebastien Buisson <sebastien.buisson@...l.net>
Fix 'deadcode' issues found by Coverity version 6.5.1:
Logically dead code (DEADCODE)
Execution cannot reach this statement.
Lustre-change: http://review.whamcloud.com/7167
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3097
Signed-off-by: Sebastien Buisson <sebastien.buisson@...l.net>
Reviewed-by: Dmitry Eremin <dmitry.eremin@...el.com>
Reviewed-by: John L. Hammond <john.hammond@...el.com>
Reviewed-by: Oleg Drokin <oleg.drokin@...el.com>
Signed-off-by: Peng Tao <bergwolf@...il.com>
Signed-off-by: Andreas Dilger <andreas.dilger@...el.com>
---
.../lustre/lustre/libcfs/linux/linux-curproc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c
index a2ef64c..e0f2f79 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c
@@ -195,7 +195,7 @@ static int cfs_access_process_vm(struct task_struct *tsk, unsigned long addr,
int cfs_get_environ(const char *key, char *value, int *val_len)
{
struct mm_struct *mm;
- char *buffer, *tmp_buf = NULL;
+ char *buffer;
int buf_len = PAGE_CACHE_SIZE;
int key_len = strlen(key);
unsigned long addr;
@@ -286,8 +286,6 @@ int cfs_get_environ(const char *key, char *value, int *val_len)
out:
mmput(mm);
kfree((void *)buffer);
- if (tmp_buf)
- kfree((void *)tmp_buf);
return rc;
}
EXPORT_SYMBOL(cfs_get_environ);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists