projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
212cd08
)
fjes: Delete an unnecessary check before the function call "vfree"
author
Markus Elfring
<elfring@users.sourceforge.net>
Fri, 6 Nov 2015 08:30:29 +0000
(09:30 +0100)
committer
David S. Miller
<davem@davemloft.net>
Sat, 7 Nov 2015 18:17:31 +0000
(13:17 -0500)
The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fjes/fjes_hw.c
patch
|
blob
|
history
diff --git
a/drivers/net/fjes/fjes_hw.c
b/drivers/net/fjes/fjes_hw.c
index 2d3848c9dc35a7f0047fb0189c0669b70dc776dc..bb8b5304d85117354595d707585613e572ce24c0 100644
(file)
--- a/
drivers/net/fjes/fjes_hw.c
+++ b/
drivers/net/fjes/fjes_hw.c
@@
-143,9
+143,7
@@
static int fjes_hw_alloc_epbuf(struct epbuf_handler *epbh)
static void fjes_hw_free_epbuf(struct epbuf_handler *epbh)
{
- if (epbh->buffer)
- vfree(epbh->buffer);
-
+ vfree(epbh->buffer);
epbh->buffer = NULL;
epbh->size = 0;