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/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/batman-adv/main.c') diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 95fd418e9567..5b678f3471fc 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c @@ -1184,7 +1184,7 @@ void batadv_tvlv_unicast_send(struct batadv_priv *bat_priv, u8 *src, ret = true; out: - if (skb && !ret) + if (!ret) kfree_skb(skb); if (orig_node) batadv_orig_node_free_ref(orig_node); -- cgit v1.2.3