summaryrefslogtreecommitdiffstats
path: root/io_uring/net.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2023-05-12 19:38:09 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-13 19:48:16 +0900
commit6bd6cd29c92401a101993290051fa55078238a52 (patch)
treed484de607a12c688b1acfadae717c772a3997c45 /io_uring/net.c
parent72fc578b220c417787384ac7c3e235e98f218be6 (diff)
downloadlinux-6bd6cd29c92401a101993290051fa55078238a52.tar.gz
linux-6bd6cd29c92401a101993290051fa55078238a52.tar.bz2
linux-6bd6cd29c92401a101993290051fa55078238a52.zip
serial: stm32: Ignore return value of uart_remove_one_port() in .remove()
Returning early from stm32_usart_serial_remove() results in a resource leak as several cleanup functions are not called. The driver core ignores the return value and there is no possibility to clean up later. uart_remove_one_port() only returns non-zero if there is some inconsistency (i.e. stm32_usart_driver.state[port->line].uart_port == NULL). This should never happen, and even if it does it's a bad idea to exit early in the remove callback without cleaning up. This prepares changing the prototype of struct platform_driver::remove to return void. See commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for further details about this quest. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230512173810.131447-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring/net.c')
0 files changed, 0 insertions, 0 deletions