From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: Re: net: xfrm: Deletion of an unnecessary check before the function call "ipcomp_free_tfms" Date: Wed, 19 Nov 2014 10:51:31 +0100 Message-ID: <546C6823.50900@users.sourceforge.net> 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> <546BAFF5.5020603@users.sourceforge.net> <20141119084542.GK4905@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Herbert Xu , Steffen Klassert , netdev@vger.kernel.org, LKML , kernel-janitors@vger.kernel.org, Julia Lawall To: Dan Carpenter Return-path: In-Reply-To: <20141119084542.GK4905@mwanda> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org >> The ipcomp_free_tfms() function tests whether its argument is NULL and then >> returns immediately. Thus the test around the call is not needed. > > It doesn't though... You are right that this function implementation does a bit more before returning because of a detected null pointer. https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tree/net/xfrm/xfrm_ipcomp.c?id=394efd19d5fcae936261bd48e5b33b21897aacf8#n247 Can you agree that input parameter validation is also performed there? Do you want that I resend my patch with a corrected commit message? Regards, Markus