diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-09 17:23:25 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-12-09 17:05:37 -0800 |
commit | 6f2d5cf9756dab190e79edd4ec098c81dca6743c (patch) | |
tree | dd1fef58ee6eb7392c3854f6eb520ce331622400 /drivers/net/ethernet/stmicro | |
parent | f75e59445808bcaf5978859606bad0e6d2e66094 (diff) | |
download | lwn-6f2d5cf9756dab190e79edd4ec098c81dca6743c.tar.gz lwn-6f2d5cf9756dab190e79edd4ec098c81dca6743c.zip |
net: stmmac: simplify the return dwmac5_rxp_disable()
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 6 |
1 files changed, 1 insertions, 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) |