From: Christophe JAILLET Date: Mon, 13 Jul 2015 18:51:32 +0000 (+0200) Subject: staging: unisys: Use kzalloc instead of kmalloc/memset X-Git-Tag: firefly_0821_release~176^2~1221^2~660 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0aa5ae1e2eed3f57ff1dfd7cd057aaff5d9c1d9f;p=firefly-linux-kernel-4.4.55.git 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 --- 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;