]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: histb: Fix an error handling path in histb_pcie_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 1 Mar 2025 18:42:54 +0000 (19:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:16 +0000 (14:39 +0200)
commita1855c2ebb88b32d65b1b775ffb4a989df6f054d
tree1d9c11cbea6e592ac25d016dc7d4f4ee18698f2a
parentb004cf517d8e9efadb0ba35cbae20067b59972a0
PCI: histb: Fix an error handling path in histb_pcie_probe()

[ Upstream commit b36fb50701619efca5f5450b355d42575cf532ed ]

If an error occurs after a successful phy_init() call, then phy_exit()
should be called.

Add the missing call, as already done in the remove function.

Fixes: bbd11bddb398 ("PCI: hisi: Add HiSilicon STB SoC PCIe controller driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[kwilczynski: remove unnecessary hipcie->phy NULL check from
histb_pcie_probe() and squash a patch that removes similar NULL
check for hipcie-phy from histb_pcie_remove() from
https://lore.kernel.org/linux-pci/c369b5d25e17a44984ae5a889ccc28a59a0737f7.1742058005.git.christophe.jaillet@wanadoo.fr]
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Link: https://lore.kernel.org/r/8301fc15cdea5d2dac21f57613e8e6922fb1ad95.1740854531.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pcie-histb.c