From: Sebastien Buisson <[email protected]>

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 <[email protected]>
Reviewed-by: Dmitry Eremin <[email protected]>
Reviewed-by: John L. Hammond <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
Signed-off-by: Peng Tao <[email protected]>
Signed-off-by: Andreas Dilger <[email protected]>
---
 .../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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to