From 40953ed87dd68742de0dd1bdecdcdfebfe1d69ae Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 23 Mar 2006 03:00:49 -0800 Subject: [PATCH] snsc kmalloc2kzalloc Change driver to use kzalloc rather than kmalloc+memset Signed-off-by: Jes Sorensen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/snsc_event.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/char/snsc_event.c') diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c index a4fa507eed9..e234d50e142 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; } } - - -- cgit v1.2.3-18-g5258