Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753745AbbFXMkt (ORCPT ); Wed, 24 Jun 2015 08:40:49 -0400 Received: from mout.web.de ([212.227.15.4]:60115 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753684AbbFXMkT (ORCPT ); Wed, 24 Jun 2015 08:40:19 -0400 Message-ID: <558AA52B.1030809@users.sourceforge.net> Date: Wed, 24 Jun 2015 14:40:11 +0200 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Daniel Mack , David Herrmann , Djalal Harouni , Greg Kroah-Hartman CC: LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: [PATCH] kdbus: Delete an unnecessary check before the function call "kdbus_domain_unref" 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> In-Reply-To: <5317A59D.4@users.sourceforge.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Uq9jjcXosI6iRdKtac9nhw577ZTruGdgCPvSxDM/BwgBagG/9cM cGJ1RTnaOsjB06/qXufHqg7pvpzgd3HJCbdIvX936BmDjIY87oHSZem0E00DaJh3lslG6Aj 0Np8yae2A7mJNkW/ijBwhdZudmfoTsNorhDdwsjDkvWDLiHa+Qq5gCofKhhL9lzNBnZcFny pDcHl+mUSTOlhs3BdAxSA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Ux/9F2QS3HQ=:h6w/tbbkI8vEKNmXPLsP9Z AjOwLQ5p2HZuJ4IG+r4AWCBOMnFrtNHh/U7EsHhfnzrqv7I9OAGa+2yjKrhu754LQYqtH0NCJ lUI8VtyCJhmEGKaQefDumIjiNkjVhNbawOGXronoaVsHOJMhx/sz34N2OLhc4FIV1oAdWZNW5 mgM/FO0tGN0BRGvwYw+A05aMVpzZfvJsywMaLFBbSotyVQkQXmGaR4qv67Q5RuDf6/h4dWQkY C2/eHhVJHF9z2IkEw+zftJj2cocNfzZq7A8hQdPbnF1McvmeiCr3RgM5bse4wof7iFVyGZ0sE /ppVI6l7b1YcDY9Nm5E9pIL9MuVX+z3JDDdEcSS75SJCKx3O1n7Aaxa7w7J5JcV0kiXtU15zm hj517cKJmuDES41afIY3YccLBAKeR+tFk3i+oYe4/GcFx3f8vR4vK7KsQFE+G2aIeAinP39Un x/i76hdGybp1m6xHh1Rl/suvtLrZK1lfo7Xj+xoIQY3F+uJ5JjM4klyo2wOEk8+hOaXfPOGOZ u8f9BZVjvxpWa5GMslhxVisy/Ta1Hea2bEAgbJH7/9GEECD4fli2JaTu/MSChubCOEcU9lj86 YHb063hDO23WG/+ayg6nPMaiMsqahss/cVoiPYBfAZASMaScNMWQrDsio1E0v09Xby7I+7FTV 8nB6MEzK2+Zk3XASE88FshQsJR7llH8Dwd1F0ErfBaPilIEfrQOJekw1+HQcJGqnxXe0= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1051 Lines: 36 From: Markus Elfring Date: Wed, 24 Jun 2015 14:30:17 +0200 The kdbus_domain_unref() 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 --- ipc/kdbus/fs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ipc/kdbus/fs.c b/ipc/kdbus/fs.c index d01f33b..205a3ad 100644 --- a/ipc/kdbus/fs.c +++ b/ipc/kdbus/fs.c @@ -325,9 +325,7 @@ static void fs_super_kill(struct super_block *sb) } kill_anon_super(sb); - - if (domain) - kdbus_domain_unref(domain); + kdbus_domain_unref(domain); } static int fs_super_set(struct super_block *sb, void *data) -- 2.4.4 -- 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/