Home
last modified time | relevance | path

Searched hist:"8 ab5fc55d7f65d58a3c3aeadf11bdf60267cd2bd" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/tty/serial/
H A Darc_uart.cdiff 8ab5fc55d7f65d58a3c3aeadf11bdf60267cd2bd Thu Apr 27 22:16:36 CDT 2023 Ke Zhang <m202171830@hust.edu.cn> serial: arc_uart: fix of_iomap leak in `arc_serial_probe`

Smatch reports:

drivers/tty/serial/arc_uart.c:631 arc_serial_probe() warn:
'port->membase' from of_iomap() not released on lines: 631.

In arc_serial_probe(), if uart_add_one_port() fails,
port->membase is not released, which would cause a resource leak.

To fix this, I replace of_iomap with devm_platform_ioremap_resource.

Fixes: 8dbe1d5e09a7 ("serial/arc: inline the probe helper")
Signed-off-by: Ke Zhang <m202171830@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Link: https://lore.kernel.org/r/20230428031636.44642-1-m202171830@hust.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>