Files
linux/drivers/tty
Yuan Can 98c01a728b serial: sunsab: Fix error handling in sunsab_init()
[ Upstream commit 1a6ec673fb ]

The sunsab_init() returns the platform_driver_register() directly without
checking its return value, if platform_driver_register() failed, the
allocated sunsab_ports is leaked.
Fix by free sunsab_ports and set it to NULL when platform_driver_register()
failed.

Fixes: c4d37215a8 ("[SERIAL] sunsab: Convert to of_driver framework.")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20221123061212.52593-1-yuancan@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:41:23 +01:00
..
2019-04-16 15:21:34 +02:00
2017-11-28 15:32:33 +01:00
2019-10-04 15:14:20 +02:00
2017-11-08 13:08:12 +01:00
2020-04-29 16:33:17 +02:00
2019-02-12 08:51:33 +01:00
2019-05-14 19:52:51 -07:00
2020-12-11 13:23:28 +01:00
2019-04-16 15:21:34 +02:00