mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-09 12:57:39 +07:00
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>
This commit is contained in:
parent
5badafb1f0
commit
a301ecbc7e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user