net: sungem: Remove unneeded cast from memory allocation

Remove dma_alloc_coherent return value cast.
This is detected by coccinelle.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
YueHaibing 2020-09-01 22:10:28 +08:00 коммит произвёл David S. Miller
Родитель ffa81fa46e
Коммит 1bac035c59
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -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;