From c799443ee13ef37221732839f1cca6f11c798b7a Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Sun, 15 Nov 2015 08:04:43 +0100 Subject: 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 Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- net/batman-adv/send.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/batman-adv/send.c') 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) -- cgit v1.2.3