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

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
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2965,8 +2965,7 @@ 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->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");