From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcel Holtmann Subject: Re: [PATCH 01/14] Big kfree NULL check cleanup - net Date: Fri, 14 Oct 2005 11:50:50 +0200 Message-ID: <1129283450.5057.29.camel@localhost.localdomain> References: <200510132125.44470.jesper.juhl@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-kernel , Andrew Morton , netdev@vger.kernel.org, "David S. Miller" , Hideaki YOSHIFUJI , Arnaldo Carvalho de Melo , Ralf Baechle , Greg Kroah-Hartman , dccp@vger.kernel.org, Patrick Caulfield , Jean Tourrilhes , Sridhar Samudrala , Andy Adamson , "J. Bruce Fields" , Nenad Corbic , Alexey Kuznetsov Return-path: To: Jesper Juhl In-Reply-To: <200510132125.44470.jesper.juhl@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Hi Jesper, > This is the net/ part of the big kfree cleanup patch. > > Remove pointless checks for NULL prior to calling kfree() in net/. > > > Sorry about the long Cc: list, but I wanted to make sure I included everyone > who's code I've changed with this patch. you forgot me ;) > --- linux-2.6.14-rc4-orig/net/bluetooth/hidp/core.c 2005-08-29 01:41:01.000000000 +0200 > +++ linux-2.6.14-rc4/net/bluetooth/hidp/core.c 2005-10-13 11:47:49.000000000 +0200 > @@ -657,9 +657,7 @@ unlink: > failed: > up_write(&hidp_session_sem); > > - if (session->input) > - kfree(session->input); > - > + kfree(session->input); > kfree(session); > return err; > } Signed-off-by: Marcel Holtmann Regards Marcel