mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging: unisys: Use kzalloc instead of kmalloc/memset
This patch turns a kmalloc/memset into an equivalent kzalloc. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d253058f49
commit
0aa5ae1e2e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user