diff options
author | Jes Sorensen <jes@sgi.com> | 2006-03-23 06:00:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 10:38:15 -0500 |
commit | 40953ed87dd68742de0dd1bdecdcdfebfe1d69ae (patch) | |
tree | c5faa3efe1e3f8381d5d8674f068556abb9400d8 /drivers/char/snsc_event.c | |
parent | 6b9438e1323a2be10dcc039f6321e7ca18b9459e (diff) |
[PATCH] snsc kmalloc2kzalloc
Change driver to use kzalloc rather than kmalloc+memset
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/snsc_event.c')
-rw-r--r-- | drivers/char/snsc_event.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c index a4fa507eed9e..e234d50e142a 100644 --- a/drivers/char/snsc_event.c +++ b/drivers/char/snsc_event.c | |||
@@ -287,7 +287,7 @@ scdrv_event_init(struct sysctl_data_s *scd) | |||
287 | { | 287 | { |
288 | int rv; | 288 | int rv; |
289 | 289 | ||
290 | event_sd = kmalloc(sizeof (struct subch_data_s), GFP_KERNEL); | 290 | event_sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL); |
291 | if (event_sd == NULL) { | 291 | if (event_sd == NULL) { |
292 | printk(KERN_WARNING "%s: couldn't allocate subchannel info" | 292 | printk(KERN_WARNING "%s: couldn't allocate subchannel info" |
293 | " for event monitoring\n", __FUNCTION__); | 293 | " for event monitoring\n", __FUNCTION__); |
@@ -295,7 +295,6 @@ scdrv_event_init(struct sysctl_data_s *scd) | |||
295 | } | 295 | } |
296 | 296 | ||
297 | /* initialize subch_data_s fields */ | 297 | /* initialize subch_data_s fields */ |
298 | memset(event_sd, 0, sizeof (struct subch_data_s)); | ||
299 | event_sd->sd_nasid = scd->scd_nasid; | 298 | event_sd->sd_nasid = scd->scd_nasid; |
300 | spin_lock_init(&event_sd->sd_rlock); | 299 | spin_lock_init(&event_sd->sd_rlock); |
301 | 300 | ||
@@ -321,5 +320,3 @@ scdrv_event_init(struct sysctl_data_s *scd) | |||
321 | return; | 320 | return; |
322 | } | 321 | } |
323 | } | 322 | } |
324 | |||
325 | |||