Re: [PATCH] fastboot: Introduce an asynchronous function callmechanism

From: Arjan van de Ven
Date: Mon Oct 13 2008 - 10:45:26 EST


On Mon, 13 Oct 2008 10:15:03 +0300
"Pekka Enberg" <penberg@xxxxxxxxxxxxxx> wrote:

> Hi Arjan,
>
> On Mon, Oct 13, 2008 at 2:44 AM, Arjan van de Ven
> <arjan@xxxxxxxxxxxxx> wrote:
> > +void call_async(int pool_number, int argc, ...)
> > +{
> > + struct async_item *item;
> > + va_list ap;
> > +
> > + if (argc > 4 || argc < 0) {
> > + WARN(1, KERN_ERR "Too many arguments to async
> > function! Skipping...\n");
> > + return;
> > + }
> > +
> > + item = kmalloc(sizeof(struct async_item), GFP_ATOMIC);
>
> Why is there no check for NULL here?


because at 35000 feet it won't return NULL ;-)

but yeah thanks for spotting, I'll fix it.

--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/