aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Heng2020-07-23 11:15:16 +0800
committerRichard Weinberger2020-10-11 23:19:35 +0200
commit9a10705b42dd541feadda4817582a7efc984c917 (patch)
treeaf31cbcbac6af2bd29a8c50d6b82df9ff94f2322
parentf2d05059e15af3f70502074f4e3a504530af504a (diff)
um: Remove redundant NULL check
Fix below warnings reported by coccicheck: ./arch/um/drivers/vector_user.c:403:2-7: WARNING: NULL check before some freeing functions is not needed. Fixes: bc8f8e4e6e7a ("um: Add a generic "fd" vector transport") Signed-off-by: Li Heng <liheng40@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--arch/um/drivers/vector_user.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/drivers/vector_user.c b/arch/um/drivers/vector_user.c
index 090ff93457c7..65b6a71a132f 100644
--- a/arch/um/drivers/vector_user.c
+++ b/arch/um/drivers/vector_user.c
@@ -397,8 +397,7 @@ static struct vector_fds *user_init_fd_fds(struct arglist *ifspec)
fd_cleanup:
if (fd >= 0)
os_close_file(fd);
- if (result != NULL)
- kfree(result);
+ kfree(result);
return NULL;
}