Skip to content

Commit f7b5964

Browse files
elfringdavem330
authored andcommitted
fjes: Delete an unnecessary check before the function call "vfree"
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 212cd08 commit f7b5964

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/fjes/fjes_hw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ static int fjes_hw_alloc_epbuf(struct epbuf_handler *epbh)
143143

144144
static void fjes_hw_free_epbuf(struct epbuf_handler *epbh)
145145
{
146-
if (epbh->buffer)
147-
vfree(epbh->buffer);
148-
146+
vfree(epbh->buffer);
149147
epbh->buffer = NULL;
150148
epbh->size = 0;
151149

0 commit comments

Comments
 (0)