amd-xgbe: Remove manual check and set of dma_mask pointer
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Thu, 14 May 2015 16:44:33 +0000 (11:44 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 May 2015 19:21:44 +0000 (15:21 -0400)
The underlying device support will set the device dma_mask pointer
if DMA is set up properly for the device.  Remove the check for and
assignment of dma_mask when it is null. Instead, just error out if
the dma_set_mask_and_coherent function fails because dma_mask is null.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-main.c

index 34c521d8b5787da695f0bf7bc1ad7ecda75a7f69..fb7c961da49f892fb9bbffeab89d78de1d121f07 100644 (file)
@@ -678,8 +678,6 @@ static int xgbe_probe(struct platform_device *pdev)
        xgbe_default_config(pdata);
 
        /* Set the DMA mask */
-       if (!dev->dma_mask)
-               dev->dma_mask = &dev->coherent_dma_mask;
        ret = dma_set_mask_and_coherent(dev,
                                        DMA_BIT_MASK(pdata->hw_feat.dma_width));
        if (ret) {