From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Wed, 19 Nov 2014 09:51:31 +0000 Subject: Re: net: xfrm: Deletion of an unnecessary check before the function call "ipcomp_free_tfms" Message-Id: <546C6823.50900@users.sourceforge.net> List-Id: 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> In-Reply-To: <20141119084542.GK4905@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Dan Carpenter Cc: "David S. Miller" , Herbert Xu , Steffen Klassert , netdev@vger.kernel.org, LKML , kernel-janitors@vger.kernel.org, Julia Lawall >> 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?id94efd19d5fcae936261bd48e5b33b21897aacf8#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