projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2d0505
)
um: Remove redundant NULL check
author
Li Heng
<liheng40@huawei.com>
Thu, 23 Jul 2020 03:15:16 +0000
(11:15 +0800)
committer
Richard Weinberger
<richard@nod.at>
Sun, 11 Oct 2020 21:19:35 +0000
(23:19 +0200)
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>
arch/um/drivers/vector_user.c
patch
|
blob
|
history
diff --git
a/arch/um/drivers/vector_user.c
b/arch/um/drivers/vector_user.c
index
090ff93
..
65b6a71
100644
(file)
--- 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;
}