- Remove duplicated preempt disable. Disabling preemption has been added to functions like u64_stats_update_begin() in the meantime. - Simplify branch structure Signed-off-by: Heiner Kallweit --- drivers/net/phy/mdio_bus.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 48c0447e6a8..b32a369cd25 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -358,22 +358,17 @@ EXPORT_SYMBOL(of_mdio_find_bus); static void mdiobus_stats_acct(struct mdio_bus_stats *stats, bool op, int ret) { - preempt_disable(); u64_stats_update_begin(&stats->syncp); u64_stats_inc(&stats->transfers); - if (ret < 0) { + if (ret < 0) u64_stats_inc(&stats->errors); - goto out; - } - - if (op) + else if (op) u64_stats_inc(&stats->reads); else u64_stats_inc(&stats->writes); -out: + u64_stats_update_end(&stats->syncp); - preempt_enable(); } /** -- 2.53.0