summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/send.c
diff options
context:
space:
mode:
authorMarkus Elfring2015-11-15 08:04:43 +0100
committerAntonio Quartulli2016-01-09 13:56:00 +0100
commitc799443ee13ef37221732839f1cca6f11c798b7a (patch)
treef4e271b61ae47e0b9ba8d238abcd5e57d300eb22 /net/batman-adv/send.c
parentbatman-adv: Add function to convert string to batadv throughput (diff)
downloadkernel-qcow2-linux-c799443ee13ef37221732839f1cca6f11c798b7a.tar.gz
kernel-qcow2-linux-c799443ee13ef37221732839f1cca6f11c798b7a.tar.xz
kernel-qcow2-linux-c799443ee13ef37221732839f1cca6f11c798b7a.zip
batman-adv: Delete unnecessary checks before the function call "kfree_skb"
The kfree_skb() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
Diffstat (limited to 'net/batman-adv/send.c')
-rw-r--r--net/batman-adv/send.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index f664324805eb..782fa33ec296 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -407,8 +407,7 @@ void batadv_schedule_bat_ogm(struct batadv_hard_iface *hard_iface)
static void batadv_forw_packet_free(struct batadv_forw_packet *forw_packet)
{
- if (forw_packet->skb)
- kfree_skb(forw_packet->skb);
+ kfree_skb(forw_packet->skb);
if (forw_packet->if_incoming)
batadv_hardif_free_ref(forw_packet->if_incoming);
if (forw_packet->if_outgoing)