diff options
-rw-r--r-- | drivers/staging/kpc2000/kpc_dma/fileops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c index d80d894f3aac..8c7859ed1237 100644 --- a/drivers/staging/kpc2000/kpc_dma/fileops.c +++ b/drivers/staging/kpc2000/kpc_dma/fileops.c @@ -66,7 +66,8 @@ static int kpc_dma_transfer(struct dev_private_data *priv, acd->page_count = count_pages(iov_base, iov_len); // Allocate an array of page pointers - acd->user_pages = kzalloc(sizeof(struct page *) * acd->page_count, GFP_KERNEL); + acd->user_pages = kcalloc(acd->page_count, sizeof(struct page *), + GFP_KERNEL); if (!acd->user_pages) { dev_err(&priv->ldev->pldev->dev, "Couldn't kmalloc space for for the page pointers\n"); rv = -ENOMEM; |