Commit 0aa5ae1e authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Greg Kroah-Hartman
Browse files

staging: unisys: Use kzalloc instead of kmalloc/memset



This patch turns a kmalloc/memset into an equivalent kzalloc.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d253058f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;