aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMadhumitha Prabakaran <madhumithabiw@gmail.com>2019-05-05 13:32:30 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-20 07:40:38 +0200
commita301ecbc7ed0e27dde933e4c323204139cdc1694 (patch)
treeb65b8c1466879b8ce8645f29cbdfd414ee8ec17b /drivers/staging
parentstaging: rtl8712: get rid of IS_MCAST (diff)
downloadlinux-dev-a301ecbc7ed0e27dde933e4c323204139cdc1694.tar.xz
linux-dev-a301ecbc7ed0e27dde933e4c323204139cdc1694.zip
Staging: kpc2000: Cleanup in kpc_dma_transfer()
Remove unnecessary typecast in kzalloc function. In addition to that replace kzalloc(sizeof(*acd)) over kzalloc(sizeof(struct aio_cb_data)) to maintain Linux kernel style. Issue suggested by Coccinelle. Signed-off-by: Madhumitha Prabakaran <madhumithabiw@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/kpc2000/kpc_dma/fileops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c
index 5741d2b49a7d..c24329affd3a 100644
--- a/drivers/staging/kpc2000/kpc_dma/fileops.c
+++ b/drivers/staging/kpc2000/kpc_dma/fileops.c
@@ -57,7 +57,7 @@ int kpc_dma_transfer(struct dev_private_data *priv, struct kiocb *kcb, unsigned
dev_dbg(&priv->ldev->pldev->dev, "kpc_dma_transfer(priv = [%p], kcb = [%p], iov_base = [%p], iov_len = %ld) ldev = [%p]\n", priv, kcb, (void*)iov_base, iov_len, ldev);
- acd = (struct aio_cb_data *) kzalloc(sizeof(struct aio_cb_data), GFP_KERNEL);
+ acd = kzalloc(sizeof(*acd), GFP_KERNEL);
if (!acd){
dev_err(&priv->ldev->pldev->dev, "Couldn't kmalloc space for for the aio data\n");
return -ENOMEM;