kernel_samsung_a53x/drivers/tty/serial/8250
Uwe Kleine-König 44f8442dac serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed
[ Upstream commit ad90d0358bd3b4554f243a425168fc7cebe7d04e ]

Returning an error code from .remove() makes the driver core emit the
little helpful error message:

	remove callback returned a non-zero value. This will be ignored.

and then remove the device anyhow. So all resources that were not freed
are leaked in this case. Skipping serial8250_unregister_port() has the
potential to keep enough of the UART around to trigger a use-after-free.

So replace the error return (and with it the little helpful error
message) by a more useful error message and continue to cleanup.

Fixes: e3f0c638f428 ("serial: 8250: omap: Fix unpaired pm_runtime_put_sync() in omap8250_remove()")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20231110152927.70601-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:49 +01:00
..
8250.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_accent.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_acorn.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_aspeed_vuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_bcm2835aux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_boca.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_dw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_dwlib.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_dwlib.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_early.c serial: 8250_omap: Add earlycon support for the AM654 UART controller 2024-11-18 12:11:46 +01:00
8250_em.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_exar.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_exar_st16c554.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_fintek.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_fourport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_fsl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_gsc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_hp300.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_hub6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_ingenic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_ioc3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_lpc18xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_lpss.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_men_mcb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_mid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_mtk.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_of.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_omap.c serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed 2024-11-18 12:12:49 +01:00
8250_pci.c tty: 8250: Add support for Intashield IS-100 2024-11-18 10:58:48 +01:00
8250_pnp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_port.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_pxa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_tegra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
8250_uniphier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_cs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00