diff options
Diffstat (limited to 'drivers/xen/gntdev.c')
-rw-r--r-- | drivers/xen/gntdev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 39871326afa2..afca14d9042e 100644 --- a/drivers/xen/gntdev.c +++ b/drivers/xen/gntdev.c | |||
@@ -114,11 +114,11 @@ static struct grant_map *gntdev_alloc_map(struct gntdev_priv *priv, int count) | |||
114 | if (NULL == add) | 114 | if (NULL == add) |
115 | return NULL; | 115 | return NULL; |
116 | 116 | ||
117 | add->grants = kzalloc(sizeof(add->grants[0]) * count, GFP_KERNEL); | 117 | add->grants = kcalloc(count, sizeof(add->grants[0]), GFP_KERNEL); |
118 | add->map_ops = kzalloc(sizeof(add->map_ops[0]) * count, GFP_KERNEL); | 118 | add->map_ops = kcalloc(count, sizeof(add->map_ops[0]), GFP_KERNEL); |
119 | add->unmap_ops = kzalloc(sizeof(add->unmap_ops[0]) * count, GFP_KERNEL); | 119 | add->unmap_ops = kcalloc(count, sizeof(add->unmap_ops[0]), GFP_KERNEL); |
120 | add->kmap_ops = kzalloc(sizeof(add->kmap_ops[0]) * count, GFP_KERNEL); | 120 | add->kmap_ops = kcalloc(count, sizeof(add->kmap_ops[0]), GFP_KERNEL); |
121 | add->pages = kzalloc(sizeof(add->pages[0]) * count, GFP_KERNEL); | 121 | add->pages = kcalloc(count, sizeof(add->pages[0]), GFP_KERNEL); |
122 | if (NULL == add->grants || | 122 | if (NULL == add->grants || |
123 | NULL == add->map_ops || | 123 | NULL == add->map_ops || |
124 | NULL == add->unmap_ops || | 124 | NULL == add->unmap_ops || |