]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tty: Fix a possible resource leak in icom_probe
authorHuang Guobin <huangguobin4@huawei.com>
Thu, 31 Mar 2022 09:10:05 +0000 (17:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:33 +0000 (18:41 +0200)
commit23e155b51d403c0ccedc60c0d6c3c452afed07fe
tree8ba830e7fd833cb4876cce86b37e0c59a849792d
parentddd67751ab86c6a65f95c35293c42f85a42ac05d
tty: Fix a possible resource leak in icom_probe

[ Upstream commit ee157a79e7c82b01ae4c25de0ac75899801f322c ]

When pci_read_config_dword failed, call pci_release_regions() and
pci_disable_device() to recycle the resource previously allocated.

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Huang Guobin <huangguobin4@huawei.com>
Link: https://lore.kernel.org/r/20220331091005.3290753-1-huangguobin4@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/icom.c