mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 07:29:12 -04:00
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: 9d61d138ab ("net: broadcom: rename BCM4908 driver & update DT binding")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0f8a3b48f9
commit
128f6ec95a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user