Skip to content

Commit 3fd177c

Browse files
Dejin Zhengdavem330
authored andcommitted
net: stmmac: dwmac_lib: remove unnecessary checks in dwmac_dma_reset()
it will check the return value of dwmac_dma_reset() in the stmmac_init_dma_engine() function and report an error if the return value is not zero. so don't need check here. Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 09d65e6 commit 3fd177c

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,14 @@
1616
int dwmac_dma_reset(void __iomem *ioaddr)
1717
{
1818
u32 value = readl(ioaddr + DMA_BUS_MODE);
19-
int err;
2019

2120
/* DMA SW reset */
2221
value |= DMA_BUS_MODE_SFT_RESET;
2322
writel(value, ioaddr + DMA_BUS_MODE);
2423

25-
err = readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
24+
return readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
2625
!(value & DMA_BUS_MODE_SFT_RESET),
2726
10000, 100000);
28-
if (err)
29-
return -EBUSY;
30-
31-
return 0;
3227
}
3328

3429
/* CSR1 enables the transmit DMA to check for new descriptor */

0 commit comments

Comments
 (0)