From 0aa5ae1e2eed3f57ff1dfd7cd057aaff5d9c1d9f Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Mon, 13 Jul 2015 20:51:32 +0200 Subject: [PATCH] staging: unisys: Use kzalloc instead of kmalloc/memset This patch turns a kmalloc/memset into an equivalent kzalloc. Signed-off-by: Christophe JAILLET Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorbus/visorbus_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 0f66f239dff0..2c46745f156a 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -281,12 +281,11 @@ devmajorminor_create_file(struct visor_device *dev, const char *name, rc = -ENOMEM; goto away; } - myattr = kmalloc(sizeof(*myattr), GFP_KERNEL); + myattr = kzalloc(sizeof(*myattr), GFP_KERNEL); if (!myattr) { rc = -ENOMEM; goto away; } - memset(myattr, 0, sizeof(struct devmajorminor_attribute)); myattr->show = DEVMAJORMINOR_ATTR; myattr->store = NULL; myattr->slot = slot; -- 2.30.2