diff options
| author | Ali Tariq <alitariq45892@gmail.com> | 2026-07-18 20:33:51 +0500 |
|---|---|---|
| committer | Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> | 2026-07-29 18:42:43 +0200 |
| commit | aaae917990623a6ca6b638557056606a1ae4a8d6 (patch) | |
| tree | e61a5001798aebc21bb87df6390f3f53c3009f2b /scripts/objdiff | |
| parent | fb9f7973473fc30d62e0f5f90d59df8ef5223777 (diff) | |
| download | linux-aaae917990623a6ca6b638557056606a1ae4a8d6.tar.gz linux-aaae917990623a6ca6b638557056606a1ae4a8d6.zip | |
PCI: starfive: Fix unchecked pm_runtime_get_sync() in probe
pm_runtime_get_sync() is called in starfive_pcie_probe() without
checking its return value. If runtime resume fails, the driver
proceeds to configure PCIe hardware through regmap_update_bits(),
enable clocks and resets, and power on the PHY, even though the
device may not actually be powered.
pm_runtime_get_sync() also increments the usage counter even when
resume fails, which would leave the counter unbalanced if this
error path were later handled without additional cleanup.
Switch to pm_runtime_resume_and_get(), which balances the usage
counter internally on failure, and bail out of probe before any
hardware is touched if resume does not succeed.
Tested on StarFive VisionFive 2 v1.2A board.
Fixes: 6168efbebace ("PCI: starfive: Enable controller runtime PM before probing host bridge")
Signed-off-by: Ali Tariq <alitariq45892@gmail.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20260718153352.661930-1-alitariq45892@gmail.com
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
