You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
tty: Fix a possible resource leak in icom_probe
[ Upstream commit ee157a79e7 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d68d5e68b7
commit
cb7147afd3
@@ -1503,7 +1503,7 @@ static int icom_probe(struct pci_dev *dev,
|
||||
retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg);
|
||||
if (retval) {
|
||||
dev_err(&dev->dev, "PCI Config read FAILED\n");
|
||||
return retval;
|
||||
goto probe_exit0;
|
||||
}
|
||||
|
||||
pci_write_config_dword(dev, PCI_COMMAND,
|
||||
|
||||
Reference in New Issue
Block a user