Messages in this thread | | | Subject | RE: [PATCH 09/14] Big kfree NULL check cleanup - misc remaining drivers | Date | Thu, 13 Oct 2005 15:39:03 -0500 | From | "Miller, Mike (OS Dev)" <> |
| |
> From: Jesper Juhl [mailto:jesper.juhl@gmail.com] > > On 10/13/05, Miller, Mike (OS Dev) <Mike.Miller@hp.com> wrote: > > > > I'm not sure I agree that these are pointless checks. > They're not in > > the main code path so nothing is lost by checking first. > What if the > > pointer is NULL???? > > > > If the pointer is NULL then this bit of code in kfree takes > care of things : > > void kfree(const void *objp) > { > ... > > if (unlikely(!objp)) > return; > ... > > Runtime behaviour is exactely the same. > kfree checks if the pointer passed to it is NULL in any case > and just returns if it is.
okay, I'm convinced.
Signed-off-by: Mike Miller <mike.miller@hp.com>
> > > -- > Jesper Juhl <jesper.juhl@gmail.com> > Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html > Plain text mails only, please http://www.expita.com/nomime.html > - 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/
| |