Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932638AbbKCUxM (ORCPT ); Tue, 3 Nov 2015 15:53:12 -0500 Received: from mout.web.de ([212.227.17.12]:56091 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756015AbbKCUxK (ORCPT ); Tue, 3 Nov 2015 15:53:10 -0500 Subject: [PATCH 1/3] batman-adv: Delete an unnecessary check before the function call "batadv_softif_vlan_free_ref" To: Antonio Quartulli , "David S. Miller" , Marek Lindner , Simon Wunderlich , b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <56391CF7.9080400@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <56391EAA.2060002@users.sourceforge.net> Date: Tue, 3 Nov 2015 21:52:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56391CF7.9080400@users.sourceforge.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:uH/PdZps6I6FUdDUuVxh3dsJy7pTbRON6n18rq5nIilaRUzV9Al QDDA0mJJU9hvx9w9sWg2SVrQuN9Z8plJS82Uqi89Sn0KLj1+tGp4AvgvuVEPuXapx+GxaRm no1ExMl5itVkJOYDjskF0DcSXNKQyRodAEFK5xz0IJea6wwvjplys81Yo9Mxe9qCWbEENKj v0l2rSOEsU0tHqDJF66ag== X-UI-Out-Filterresults: notjunk:1;V01:K0:BtYx4WTs0AI=:w+GTCTMG55lz1QYe/9iI/d 7xiHxwR7sqWPHEVFeUps3YXR7PkZh18eXrBL8qpOl0IYxvhKarSzLblVKwqM+BZvP3i2C6t+3 IER/7bmLbOG0e8ZkGVwgPGRNErCXa9z03CSuG5jNdbjsqdI3OdfyKmBqKg7xuELGDz+HHhVRX A1Xz7sqO//DZgWWNITS/g9mlNMTfjokFNY+W2nXlvACkDyajTs7rz3n/Wd0Z9bpeZoEmb9t+y rV1VHgyRgF/040K7V8YLksr/Aah7fpBQX7a5i2NrutFj2UvGbv7RT+QObVdz9Ierw5zc/L5BE hIZUY1eaOG+Hzrow3TQ0nMkoTWNyGseTrui/Wh8PGrYSDtYTCkZAJFs/6LAbGtMyrWtEvrpen OmziD8K3hxhLmHR/di3dH2CarZ5T8YkSAu8JLqUQ4RLCNaFiExIaujZAnQa/tCg9dZUcuZhxu eqvLq3V3eP31ZOBf9malfvCFePy5b4el9WtjJXmJgvXij9dUqBBsqjKFL/sQ5tzVSkIjlBDoH ienz14hKF+Yvg4T0Hn/jBUY+ylTYjkzBN5nKYbt2CgSrtcueW6H0o0ivHTgiIPKhCNzTjEKy0 XcbjHArkqP8oVTJN5qYtEMpK68SyyDimrJGmU9Fas9cEt2/3AdOjEwYKu34yY7zLwbQwJIsx7 ca4MvwmOcgIq/RU4rCq4pJopop6PiD4W6IKKAKXbA0GkVQS4fjQrud5k8xEgsWQSSynakBEgR pmk/IDjOI9T5JR5kRKqYHkrCnb9FTWLToYpFKvCrsxLigMNYPcHFAyAY+AnTGmVEVqpwbzWq9 0lS4wRq Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1220 Lines: 35 From: Markus Elfring Date: Tue, 3 Nov 2015 19:20:34 +0100 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 --- 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 4228b10..48315de 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -3336,8 +3336,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.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/