lkml.org 
[lkml]   [2006]   [Jul]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 21 Jul 2006 09:58:41 +0300
From"Pekka Enberg" <>
SubjectRe: [PATCH] drivers: Conversions from kmalloc+memset to k(z|c)alloc.
On 7/21/06, Rolf Eike Beer <eike-kernel@sf-tec.de> wrote:
> > -     if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))
> > +     handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
> > +     if (!handle)
> >               return NULL;
>
> sizeof(*handle)?

In general, yes. However, some maintainers don't like that, so I would
recommend to keep them as-is unless you get a clear ack from the
maintainer to change it.
-
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/

\
 
 \ /
  Last update: 2006-07-21 09:01    [from the cache]
©2003-2008