lkml.org 
[lkml]   [2010]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: [PATCH 4/4] input: dynamically allocate ABS information
From
Date
On Wed, 2010-07-21 at 11:22 +0200, ext-phil.2.carmody@nokia.com wrote:
> A tiny tiny nit...
>
> From: Dmitry Torokhov [dmitry.torokhov@gmail.com]
> ...
> +void input_alloc_absinfo(struct input_dev *dev)
> +{
> + if (!dev->absinfo)
> + dev->absinfo = kcalloc(ABS_CNT, sizeof(struct input_absinfo),
> + GFP_KERNEL);
> +
> + WARN(!dev->absinfo, "%s(): kzalloc() failed?\n", __func__);
>
> kcalloc failed, not kzalloc.

kmalloc and friends already print a warning with a stack dump when they
fail, unless this is overrided with __GFP_NOWARN, which is not the case
here. So in usually we do not print messages/warnigns when we fail to
allocate.

--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

--
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: 2010-07-21 12:53    [W:0.370 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site