]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Release OF node in pci_scan_device()'s error path
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sun, 24 Jan 2021 23:28:26 +0000 (02:28 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Mar 2021 15:18:49 +0000 (10:18 -0500)
commitf00e149ed92be0ac683b16911133ce82ebfed118
tree3006b4178fe6ca3bc7b5859cb9472e74f41438b5
parent1b8bd930b05ba1f659bccfc6ef406e93916f57ed
PCI: Release OF node in pci_scan_device()'s error path

In pci_scan_device(), if pci_setup_device() fails for any reason, the code
will not release device's of_node by calling pci_release_of_node().  Fix
that by calling the release function.

Fixes: edc86b5348bb ("pci/of: Match PCI devices to OF nodes dynamically")
Link: https://lore.kernel.org/r/20210124232826.1879-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
drivers/pci/probe.c