]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: sungem: Remove unneeded cast from memory allocation
authorYueHaibing <yuehaibing@huawei.com>
Tue, 1 Sep 2020 14:10:28 +0000 (22:10 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Sep 2020 18:47:59 +0000 (11:47 -0700)
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>
drivers/net/ethernet/sun/sungem.c

index eeb8518c8a84d43421a4245e56f486f686339c02..b7093975b14cbbbda7c820996f9324835e88042f 100644 (file)
@@ -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;