]> git.baikalelectronics.ru Git - kernel.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:36:20 +0000 (18:36 +0200)
commit36e9ea3ad020b41ca8de223e591e43eae41aa39a
tree7d17379da9ad9e7b8cdf96f659ab43d9e112ff7a
parent1fe2b366cfad11765bfe2f3e27031995ab96256f
tty: Fix a possible resource leak in icom_probe

[ Upstream commit b4646b31eff569a45812bf975989d57c25e727a2 ]

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