net: mediatek: check device_reset return code
[deliverable/linux.git] / drivers / net / ethernet / mediatek / mtk_eth_soc.c
index ba3afa5d46401215d5d3865dc179f17e37e0ade5..1e6c5498bba9fcafce0cc6acf8b9c157f64d5aa9 100644 (file)
@@ -453,7 +453,7 @@ static inline void mtk_rx_get_desc(struct mtk_rx_dma *rxd,
 /* the qdma core needs scratch memory to be setup */
 static int mtk_init_fq_dma(struct mtk_eth *eth)
 {
-       unsigned int phy_ring_head, phy_ring_tail;
+       dma_addr_t phy_ring_head, phy_ring_tail;
        int cnt = MTK_DMA_SIZE;
        dma_addr_t dma_addr;
        int i;
@@ -1676,10 +1676,9 @@ static int mtk_probe(struct platform_device *pdev)
        struct mtk_eth *eth;
        int err;
 
-       pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
-       pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
-
-       device_reset(&pdev->dev);
+       err = device_reset(&pdev->dev);
+       if (err)
+               return err;
 
        match = of_match_device(of_mtk_match, &pdev->dev);
        soc = (struct mtk_soc_data *)match->data;
This page took 0.039742 seconds and 5 git commands to generate.