All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <a@unstable.cc>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
	Markus Elfring <elfring@users.sourceforge.net>,
	Marek Lindner <mareklindner@neomailbox.ch>,
	Antonio Quartulli <a@unstable.cc>
Subject: [PATCH 10/16] batman-adv: Delete an unnecessary check before the function call "batadv_softif_vlan_free_ref"
Date: Sat,  9 Jan 2016 21:20:15 +0800	[thread overview]
Message-ID: <1452345621-15908-11-git-send-email-a__12180.9621145532$1452346801$gmane$org@unstable.cc> (raw)
In-Reply-To: <1452345621-15908-1-git-send-email-a@unstable.cc>

From: Markus Elfring <elfring@users.sourceforge.net>

The batadv_softif_vlan_free_ref() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call 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>
---
 net/batman-adv/translation-table.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index ec67deff1621..5852fda9f175 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -3356,8 +3356,7 @@ bool batadv_is_ap_isolated(struct batadv_priv *bat_priv, u8 *src, u8 *dst,
 	ret = true;
 
 out:
-	if (vlan)
-		batadv_softif_vlan_free_ref(vlan);
+	batadv_softif_vlan_free_ref(vlan);
 	if (tt_global_entry)
 		batadv_tt_global_entry_free_ref(tt_global_entry);
 	if (tt_local_entry)
-- 
2.7.0

  parent reply	other threads:[~2016-01-09 13:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09 13:20 [B.A.T.M.A.N.] pull request: batman-adv 20160109 Antonio Quartulli
2016-01-09 13:20 ` [PATCH 01/16] batman-adv: Start new development cycle Antonio Quartulli
2016-01-09 13:20 ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` [B.A.T.M.A.N.] [PATCH 02/16] batman-adv: Fix lockdep annotation of batadv_tlv_container_remove Antonio Quartulli
2016-01-09 13:20 ` Antonio Quartulli
2016-01-09 13:20 ` [PATCH 03/16] batman-adv: remove leftovers of unused BATADV_PRIMARIES_FIRST_HOP flag Antonio Quartulli
2016-01-09 13:20   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` [PATCH 04/16] batman-adv: purge bridge loop avoidance when its disabled Antonio Quartulli
2016-01-09 13:20   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` [PATCH 05/16] batman-adv: increase BLA wait periods to 6 Antonio Quartulli
2016-01-09 13:20   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` [PATCH 06/16] batman-adv: only call post function if something changed Antonio Quartulli
2016-01-09 13:20   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` [PATCH 07/16] batman-adv: Add function to convert string to batadv throughput Antonio Quartulli
2016-01-09 13:20   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` [PATCH 08/16] batman-adv: Delete unnecessary checks before the function call "kfree_skb" Antonio Quartulli
2016-01-09 13:20   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` [PATCH 09/16] batman-adv: Less checks in batadv_tvlv_unicast_send() Antonio Quartulli
2016-01-09 13:20   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` Antonio Quartulli [this message]
2016-01-09 13:20 ` [B.A.T.M.A.N.] [PATCH 10/16] batman-adv: Delete an unnecessary check before the function call "batadv_softif_vlan_free_ref" Antonio Quartulli
2016-01-09 13:20 ` [PATCH 11/16] batman-adv: Split a condition check Antonio Quartulli
2016-01-09 13:20   ` [B.A.T.M.A.N.] " Antonio Quartulli
2016-01-09 13:20 ` [B.A.T.M.A.N.] [PATCH 12/16] batman-adv: Change ifconfig examples to iproute2 Antonio Quartulli
2016-01-09 13:20 ` Antonio Quartulli
2016-01-09 13:20 ` [B.A.T.M.A.N.] [PATCH 13/16] batman-adv: Fix kernel-doc parsing of main structs Antonio Quartulli
2016-01-09 13:20 ` Antonio Quartulli
2016-01-09 13:20 ` [B.A.T.M.A.N.] [PATCH 14/16] batman-adv: Fix kerneldoc member names in for " Antonio Quartulli
2016-01-09 13:20 ` Antonio Quartulli
2016-01-09 13:20 ` [B.A.T.M.A.N.] [PATCH 15/16] batman-adv: Remove kerneldoc for missing struct members Antonio Quartulli
2016-01-09 13:20 ` Antonio Quartulli
2016-01-09 13:20 ` [PATCH 16/16] batman-adv: Add kerneldoc for batadv_neigh_node::refcount Antonio Quartulli
2016-01-09 13:20 ` [B.A.T.M.A.N.] " Antonio Quartulli
     [not found] ` <1452345621-15908-1-git-send-email-a-2CpIooy/SPIKlTDg6p0iyA@public.gmane.org>
2016-01-10  2:49   ` pull request: batman-adv 20160109 David Miller
2016-01-10  2:49     ` [B.A.T.M.A.N.] " David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='1452345621-15908-11-git-send-email-a__12180.9621145532$1452346801$gmane$org@unstable.cc' \
    --to=a@unstable.cc \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=davem@davemloft.net \
    --cc=elfring@users.sourceforge.net \
    --cc=mareklindner@neomailbox.ch \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.