提交 128f6ec9 编写于 作者: J Jiasheng Jiang 提交者: David S. Miller

net: bcm4908: Handle dma_set_coherent_mask error codes

The return value of dma_set_coherent_mask() is not always 0.
To catch the exception in case that dma is not support the mask.

Fixes: 9d61d138 ("net: broadcom: rename BCM4908 driver & update DT binding")
Signed-off-by: NJiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0f8a3b48
......@@ -708,7 +708,9 @@ static int bcm4908_enet_probe(struct platform_device *pdev)
enet->irq_tx = platform_get_irq_byname(pdev, "tx");
dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
err = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
if (err)
return err;
err = bcm4908_enet_dma_alloc(enet);
if (err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册