[PATCH net-next] net: stmmac: simplify the return dwmac5_rxp_disable()

From: Zheng Yongjun
Date: Wed Dec 09 2020 - 04:24:02 EST


Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@xxxxxxxxxx>
---
drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c
index 67ba67ed0cb9..03e79a677c8b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac5.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac5.c
@@ -305,17 +305,13 @@ int dwmac5_safety_feat_dump(struct stmmac_safety_stats *stats,
static int dwmac5_rxp_disable(void __iomem *ioaddr)
{
u32 val;
- int ret;

val = readl(ioaddr + MTL_OPERATION_MODE);
val &= ~MTL_FRPE;
writel(val, ioaddr + MTL_OPERATION_MODE);

- ret = readl_poll_timeout(ioaddr + MTL_RXP_CONTROL_STATUS, val,
+ return readl_poll_timeout(ioaddr + MTL_RXP_CONTROL_STATUS, val,
val & RXPI, 1, 10000);
- if (ret)
- return ret;
- return 0;
}

static void dwmac5_rxp_enable(void __iomem *ioaddr)
--
2.22.0