aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/dwc/pcie-qcom-common.c
diff options
context:
space:
mode:
authorJoe Hattori <[email protected]>2025-01-04 08:04:53 +0000
committerMark Brown <[email protected]>2025-01-06 13:08:49 +0000
commitdddca3b2fc676113c58b04aaefe84bfb958ac83e (patch)
tree823e4075816871d4f63a47867b88c0affe1e9bee /drivers/pci/controller/dwc/pcie-qcom-common.c
parentregulator: tps65219: Remove debugging helper function (diff)
downloadkernel-dddca3b2fc676113c58b04aaefe84bfb958ac83e.tar.gz
kernel-dddca3b2fc676113c58b04aaefe84bfb958ac83e.zip
regulator: of: Implement the unwind path of of_regulator_match()
of_regulator_match() does not release the OF node reference in the error path, resulting in an OF node leak. Therefore, call of_node_put() on the obtained nodes before returning the EINVAL error. Since it is possible that some drivers call this function and do not exit on failure, such as s2mps11_pmic_driver, clear the init_data and of_node in the error path. This was reported by an experimental verification tool that I am developing. As I do not have access to actual devices nor the QEMU board configuration to test drivers that call this function, no runtime test was able to be performed. Fixes: 1c8fa58f4750 ("regulator: Add generic DT parsing for regulators") Signed-off-by: Joe Hattori <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom-common.c')
0 files changed, 0 insertions, 0 deletions