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: bc8f8e4e6e ("um: Add a generic "fd" vector transport")
Signed-off-by: Li Heng <liheng40@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Li Heng 2020-07-23 11:15:16 +08:00 committed by Richard Weinberger
parent f2d05059e1
commit 9a10705b42
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}