Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754021AbbFXMqA (ORCPT ); Wed, 24 Jun 2015 08:46:00 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:35513 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752950AbbFXMpr (ORCPT ); Wed, 24 Jun 2015 08:45:47 -0400 Date: Wed, 24 Jun 2015 13:45:33 +0100 From: Djalal Harouni To: SF Markus Elfring Cc: Daniel Mack , David Herrmann , Greg Kroah-Hartman , LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: Re: [PATCH] kdbus: Delete an unnecessary check before the function call "kdbus_domain_unref" Message-ID: <20150624124533.GA9939@dztty> References: <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> <558AA52B.1030809@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <558AA52B.1030809@users.sourceforge.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1268 Lines: 44 On Wed, Jun 24, 2015 at 02:40:11PM +0200, SF Markus Elfring wrote: > 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 > Reviewed-by: Djalal Harouni -- Djalal Harouni http://opendz.org -- 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/