diff options
| author | 2026-01-24 23:42:45 +0800 | |
|---|---|---|
| committer | 2026-02-26 12:18:22 +0530 | |
| commit | 3b55079d6387805ede687e234d84669aeb0f7e98 (patch) | |
| tree | 3d4a0f3cc69e57178f7984326926cd520e8a5b3e /include/linux/bcma/ssh:/git@git.zx2c4.com/git: | |
| parent | Linux 7.0-rc1 (diff) | |
PCI: imx6: Fix device node reference leak in imx_pcie_probe()
In imx_pcie_probe(), of_parse_phandle() returns the device node pointer
with increased refcount. The pointer reference must be dropped by the
caller when it's no longer needed. However, imx_pcie_probe() doesn't drop
the reference, causing reference leak.
Fix this by using the __free(device_node) cleanup handler to drop the
reference when the function goes out of scope.
Fixes: 1df82ec46600 ("PCI: imx: Add workaround for e10728, IMX7d PCIe PLL failure")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
[mani: commit log]
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Richard Zhu <hongxing.zhu@nxp.com>
Link: https://patch.msgid.link/20260124-pci_imx6-v2-1-acb8d5187683@gmail.com
Diffstat (limited to 'include/linux/bcma/ssh:/git@git.zx2c4.com/git:')
0 files changed, 0 insertions, 0 deletions
