Commit 1bac035c authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

net: sungem: Remove unneeded cast from memory allocation

Remove dma_alloc_coherent return value cast.
This is detected by coccinelle.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ffa81fa4
......@@ -2965,9 +2965,8 @@ static int gem_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/* It is guaranteed that the returned buffer will be at least
* PAGE_SIZE aligned.
*/
gp->init_block = (struct gem_init_block *)
dma_alloc_coherent(&pdev->dev, sizeof(struct gem_init_block),
&gp->gblock_dvma, GFP_KERNEL);
gp->init_block = dma_alloc_coherent(&pdev->dev, sizeof(struct gem_init_block),
&gp->gblock_dvma, GFP_KERNEL);
if (!gp->init_block) {
pr_err("Cannot allocate init block, aborting\n");
err = -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment