From 3163002ad08bcd86f57a5c9d7beeb93bb48d370f Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 3 Jan 2011 18:24:48 +0000 Subject: [PATCH] dahdi_dynamic_loc: kmalloc/memset -> kzalloc Signed-off-by: Shaun Ruffell Acked-by: Kinsey Moore git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9563 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi_dynamic_loc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/dahdi/dahdi_dynamic_loc.c b/drivers/dahdi/dahdi_dynamic_loc.c index 6a24f41..5a5cb02 100644 --- a/drivers/dahdi/dahdi_dynamic_loc.c +++ b/drivers/dahdi/dahdi_dynamic_loc.c @@ -179,11 +179,8 @@ static void *dahdi_dynamic_local_create(struct dahdi_span *span, char *address) if (key == -1 || id == -1) goto INVALID_ADDRESS; - d = kmalloc(sizeof(struct dahdi_dynamic_local), GFP_KERNEL); + d = kzalloc(sizeof(*d), GFP_KERNEL); if (d) { - /* Zero it out */ - memset(d, 0, sizeof(struct dahdi_dynamic_local)); - d->key = key; d->id = id; d->span = span;