public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: 8250: remove return statements from void function
@ 2015-05-11  3:30 Masahiro Yamada
  2015-05-24 19:46 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2015-05-11  3:30 UTC (permalink / raw)
  To: linux-serial
  Cc: Masahiro Yamada, Sebastian Andrzej Siewior, Jiri Slaby,
	Peter Hurley, Alan Cox, Andy Shevchenko, linux-kernel,
	Ricardo Ribalda Delgado, Tony Lindgren, Greg Kroah-Hartman,
	Yoshihiro YUNOMAE

serial8250_set_mctrl() is a void type function.  Returning something
does not look nice.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/tty/serial/8250/8250_core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 4882027..146f56c 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -2019,8 +2019,9 @@ EXPORT_SYMBOL_GPL(serial8250_do_set_mctrl);
 static void serial8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
 {
 	if (port->set_mctrl)
-		return port->set_mctrl(port, mctrl);
-	return serial8250_do_set_mctrl(port, mctrl);
+		port->set_mctrl(port, mctrl);
+	else
+		serial8250_do_set_mctrl(port, mctrl);
 }
 
 static void serial8250_break_ctl(struct uart_port *port, int break_state)
-- 
1.9.1


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

end of thread, other threads:[~2015-05-25 16:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11  3:30 [PATCH] serial: 8250: remove return statements from void function Masahiro Yamada
2015-05-24 19:46 ` Greg Kroah-Hartman
2015-05-25  1:53   ` Masahiro Yamada
2015-05-25 16:23     ` Greg Kroah-Hartman

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