Skip to content

Commit

Permalink
net: stmmac: simplify the return dwmac5_rxp_disable()
Browse files Browse the repository at this point in the history
Simplify the return expression.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zheng Yongjun authored and David S. Miller committed Dec 10, 2020
1 parent f75e594 commit 6f2d5cf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/net/ethernet/stmicro/stmmac/dwmac5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6f2d5cf

Please sign in to comment.