lkml.org 
[lkml]   [2010]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] hid: egalax: Use kzalloc
On Wed, 13 Oct 2010, Chase Douglas wrote:

> > To avoid unnecessary explicit initialization, allocate zeroed memory.
> >
> > Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
> > ---
> > drivers/hid/hid-egalax.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/hid/hid-egalax.c b/drivers/hid/hid-egalax.c
> > index 54b017a..5a1b52e 100644
> > --- a/drivers/hid/hid-egalax.c
> > +++ b/drivers/hid/hid-egalax.c
> > @@ -221,7 +221,7 @@ static int egalax_probe(struct hid_device *hdev, const struct hid_device_id *id)
> > struct egalax_data *td;
> > struct hid_report *report;
> >
> > - td = kmalloc(sizeof(struct egalax_data), GFP_KERNEL);
> > + td = kzalloc(sizeof(struct egalax_data), GFP_KERNEL);
> > if (!td) {
> > dev_err(&hdev->dev, "cannot allocate eGalax data\n");
> > return -ENOMEM;
>
> Pretty obvious.
>
> Acked-by: Chase Douglas <chase.douglas@canonical.com>

Applied, thanks.

--
Jiri Kosina
SUSE Labs, Novell Inc.


\
 
 \ /
  Last update: 2010-11-04 15:43    [W:0.042 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site