diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-05-12 19:38:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-05-13 19:48:16 +0900 |
commit | d5b3d02d0b107345f2a6ecb5b06f98356f5c97ab (patch) | |
tree | 9e7cd803947e6b757ba8382d34150d30731f94e4 /include/linux/serial_core.h | |
parent | 6bd6cd29c92401a101993290051fa55078238a52 (diff) | |
download | linux-d5b3d02d0b107345f2a6ecb5b06f98356f5c97ab.tar.gz linux-d5b3d02d0b107345f2a6ecb5b06f98356f5c97ab.tar.bz2 linux-d5b3d02d0b107345f2a6ecb5b06f98356f5c97ab.zip |
serial: Make uart_remove_one_port() return void
The return value is only ever used as a return value for remove callbacks
of platform drivers. This return value is ignored by the driver core.
(The only effect is an error message, but uart_remove_one_port() already
emitted one in this case.)
So the return value isn't used at all and uart_remove_one_port() can be
changed to return void without any loss. Also this better matches the
Linux device model as remove functions are not supposed to fail.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20230512173810.131447-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r-- | include/linux/serial_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 66ecec15a1bf..ddcdb5b8523e 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -853,7 +853,7 @@ void uart_console_write(struct uart_port *port, const char *s, int uart_register_driver(struct uart_driver *uart); void uart_unregister_driver(struct uart_driver *uart); int uart_add_one_port(struct uart_driver *reg, struct uart_port *port); -int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); +void uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); bool uart_match_port(const struct uart_port *port1, const struct uart_port *port2); |