]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
staging: fwserial: Fix error handling in fwserial_create
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 21 Dec 2020 12:24:35 +0000 (20:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Dec 2020 14:11:52 +0000 (15:11 +0100)
commitf31559af97a0eabd467e4719253675b7dccb8a46
treeaa7a0fb473c4d26e35bc5e18fa05697f680464dc
parentec36ae7189acd9a24f417e4814e627034da68922
staging: fwserial: Fix error handling in fwserial_create

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: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20201221122437.10274-1-dinghao.liu@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fwserial/fwserial.c