diff options
| author | Christophe JAILLET <[email protected]> | 2015-07-13 20:51:32 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-07-14 18:37:18 -0700 |
| commit | 0aa5ae1e2eed3f57ff1dfd7cd057aaff5d9c1d9f (patch) | |
| tree | 3a34738174d208bc9b1df01653d985f374332fa7 | |
| parent | d253058f490febdfdbe0a0f09a25166c71afd2b3 (diff) | |
staging: unisys: Use kzalloc instead of kmalloc/memset
This patch turns a kmalloc/memset into an equivalent kzalloc.
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/staging/unisys/visorbus/visorbus_main.c | 3 |
1 files changed, 1 insertions, 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; |