[linux-next] LinuxNextTracking branch, master, updated. next-20160111

batman at open-mesh.org batman at open-mesh.org
Tue Jan 12 00:15:46 CET 2016

The following commit has been merged in the master branch:
commit c799443ee13ef37221732839f1cca6f11c798b7a
Author: Markus Elfring <elfring at users.sourceforge.net>
Date:   Sun Nov 15 08:04:43 2015 +0100

    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 at users.sourceforge.net>
    Signed-off-by: Marek Lindner <mareklindner at neomailbox.ch>
    Signed-off-by: Antonio Quartulli <a at unstable.cc>

diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c
index 95fd418..5b678f3 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;
-	if (skb && !ret)
+	if (!ret)
 	if (orig_node)
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c
index f5276be..c98b0ab 100644
--- a/net/batman-adv/network-coding.c
+++ b/net/batman-adv/network-coding.c
@@ -244,9 +244,7 @@ static void batadv_nc_path_free_ref(struct batadv_nc_path *nc_path)
 static void batadv_nc_packet_free(struct batadv_nc_packet *nc_packet)
-	if (nc_packet->skb)
-		kfree_skb(nc_packet->skb);
+	kfree_skb(nc_packet->skb);
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index f664324..782fa33 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)
 	if (forw_packet->if_outgoing)


More information about the linux-merge mailing list