diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-11-15 08:04:43 +0100 |
---|---|---|
committer | Antonio Quartulli <a@unstable.cc> | 2016-01-09 20:56:00 +0800 |
commit | c799443ee13ef37221732839f1cca6f11c798b7a (patch) | |
tree | f4e271b61ae47e0b9ba8d238abcd5e57d300eb22 /net/batman-adv/network-coding.c | |
parent | d737ccbed3e62dd45d631cf69183de005144d05b (diff) | |
download | op-kernel-dev-c799443ee13ef37221732839f1cca6f11c798b7a.zip op-kernel-dev-c799443ee13ef37221732839f1cca6f11c798b7a.tar.gz |
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/network-coding.c')
-rw-r--r-- | net/batman-adv/network-coding.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); batadv_nc_path_free_ref(nc_packet->nc_path); kfree(nc_packet); } |