lkml.org 
[lkml]   [2019]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: vt6656: Delete an unnecessary ch eck before the macro call “dev kfree skb”
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 21 Aug 2019 13:56:35 +0200

The dev_kfree_skb() 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>
---
drivers/staging/vt6656/main_usb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 856ba97aec4f..f57e890659aa 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -422,8 +422,7 @@ static void vnt_free_rx_bufs(struct vnt_private *priv)
}

/* deallocate skb */
- if (rcb->skb)
- dev_kfree_skb(rcb->skb);
+ dev_kfree_skb(rcb->skb);

kfree(rcb);
}
--
2.23.0
\
 
 \ /
  Last update: 2019-08-21 14:09    [W:0.022 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site