summaryrefslogtreecommitdiff
path: root/drivers/char/snsc_event.c
diff options
context:
space:
mode:
authorJes Sorensen <jes@sgi.com>2006-03-23 03:00:49 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 07:38:15 -0800
commit40953ed87dd68742de0dd1bdecdcdfebfe1d69ae (patch)
treec5faa3efe1e3f8381d5d8674f068556abb9400d8 /drivers/char/snsc_event.c
parent6b9438e1323a2be10dcc039f6321e7ca18b9459e (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.c5
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)
{
int rv;
- event_sd = kmalloc(sizeof (struct subch_data_s), GFP_KERNEL);
+ event_sd = kzalloc(sizeof (struct subch_data_s), GFP_KERNEL);
if (event_sd == NULL) {
printk(KERN_WARNING "%s: couldn't allocate subchannel info"
" for event monitoring\n", __FUNCTION__);
@@ -295,7 +295,6 @@ scdrv_event_init(struct sysctl_data_s *scd)
}
/* initialize subch_data_s fields */
- memset(event_sd, 0, sizeof (struct subch_data_s));
event_sd->sd_nasid = scd->scd_nasid;
spin_lock_init(&event_sd->sd_rlock);
@@ -321,5 +320,3 @@ scdrv_event_init(struct sysctl_data_s *scd)
return;
}
}
-
-