[PATCH] clocksource/drivers: remove unnecessary return in switch statement

From: cgel . zte
Date: Mon Apr 25 2022 - 04:46:58 EST


From: Minghao Chi <chi.minghao@xxxxxxxxxx>

Since there's a return immediately after the 'break', there's no need for
this extra 'return'.

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx>
---
drivers/clocksource/timer-msc313e.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/drivers/clocksource/timer-msc313e.c b/drivers/clocksource/timer-msc313e.c
index 54c54ca7c786..fedcbcafd320 100644
--- a/drivers/clocksource/timer-msc313e.c
+++ b/drivers/clocksource/timer-msc313e.c
@@ -233,14 +233,10 @@ static int __init msc313e_timer_init(struct device_node *np)
switch (num_called) {
case 0:
ret = msc313e_clksrc_init(np);
- if (ret)
- return ret;
break;

default:
ret = msc313e_clkevt_init(np);
- if (ret)
- return ret;
break;
}

--
2.25.1