Skip to content

Commit

Permalink
net: ll_temac: Switch to use dev_err_probe() helper
Browse files Browse the repository at this point in the history
dev_err() can be replace with dev_err_probe() which will check if error
code is -EPROBE_DEFER.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yang Yingliang authored and David S. Miller committed Sep 21, 2022
1 parent c222cd2 commit 75ae8c2
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions drivers/net/ethernet/xilinx/ll_temac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,16 +1563,12 @@ static int temac_probe(struct platform_device *pdev)
}

/* Error handle returned DMA RX and TX interrupts */
if (lp->rx_irq < 0) {
if (lp->rx_irq != -EPROBE_DEFER)
dev_err(&pdev->dev, "could not get DMA RX irq\n");
return lp->rx_irq;
}
if (lp->tx_irq < 0) {
if (lp->tx_irq != -EPROBE_DEFER)
dev_err(&pdev->dev, "could not get DMA TX irq\n");
return lp->tx_irq;
}
if (lp->rx_irq < 0)
return dev_err_probe(&pdev->dev, lp->rx_irq,
"could not get DMA RX irq\n");
if (lp->tx_irq < 0)
return dev_err_probe(&pdev->dev, lp->tx_irq,
"could not get DMA TX irq\n");

if (temac_np) {
/* Retrieve the MAC address */
Expand Down

0 comments on commit 75ae8c2

Please sign in to comment.