mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 01:36:58 -05:00
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 <[email protected]> Signed-off-by: Huang Guobin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
f6e07eb7eb
commit
8c014373f1
1 changed files with 1 additions and 1 deletions
|
|
@ -1499,7 +1499,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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue