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 12:48:16 +0200 |
commit | d5b3d02d0b107345f2a6ecb5b06f98356f5c97ab (patch) | |
tree | 9e7cd803947e6b757ba8382d34150d30731f94e4 /drivers/tty/serial/lantiq.c | |
parent | serial: stm32: Ignore return value of uart_remove_one_port() in .remove() (diff) | |
download | linux-d5b3d02d0b107345f2a6ecb5b06f98356f5c97ab.tar.xz 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 'drivers/tty/serial/lantiq.c')
-rw-r--r-- | drivers/tty/serial/lantiq.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c index a58e9277dfad..d413f97f7190 100644 --- a/drivers/tty/serial/lantiq.c +++ b/drivers/tty/serial/lantiq.c @@ -889,7 +889,9 @@ static int lqasc_remove(struct platform_device *pdev) { struct uart_port *port = platform_get_drvdata(pdev); - return uart_remove_one_port(&lqasc_reg, port); + uart_remove_one_port(&lqasc_reg, port); + + return 0; } static const struct ltq_soc_data soc_data_lantiq = { |