Commit 6f7da6a2 authored by Dinghao Liu's avatar Dinghao Liu Committed by Zheng Zengkai
Browse files

staging: fwserial: Fix error handling in fwserial_create



stable inclusion
from stable-5.10.21
commit b3854d1550f09e7616d915d9a540a88e1d269c66
bugzilla: 50609

--------------------------------

[ Upstream commit f31559af ]

When fw_core_add_address_handler() fails, we need to destroy
the port by tty_port_destroy(). Also we need to unregister
the address handler by fw_core_remove_address_handler() on
failure.

Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20201221122437.10274-1-dinghao.liu@zju.edu.cn


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent d3d9ca2e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment