diff options
author | Li Heng <liheng40@huawei.com> | 2020-07-23 06:15:16 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-10-12 00:19:35 +0300 |
commit | 9a10705b42dd541feadda4817582a7efc984c917 (patch) | |
tree | af31cbcbac6af2bd29a8c50d6b82df9ff94f2322 /arch/um | |
parent | f2d05059e15af3f70502074f4e3a504530af504a (diff) | |
download | linux-9a10705b42dd541feadda4817582a7efc984c917.tar.xz |
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>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/vector_user.c | 3 |
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; } |