mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers: remove unnecessary return in switch statement
@ 2022-04-25  8:46 cgel.zte
  2022-04-25 18:05 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-04-25  8:46 UTC (permalink / raw)
  To: daniel
  Cc: romain.perier, daniel.lezcano, tglx, linux-arm-kernel,
	linux-kernel, Minghao Chi, Zeal Robot

From: Minghao Chi <chi.minghao@zte.com.cn>

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-25 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-25  8:46 [PATCH] clocksource/drivers: remove unnecessary return in switch statement cgel.zte
2022-04-25 18:05 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®