]> git.ipfire.org Git - thirdparty/linux.git/commit
phy: core: Reinstate pm_runtime_enabled() check in phy_pm_runtime_put()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 30 Dec 2025 15:04:05 +0000 (16:04 +0100)
committerVinod Koul <vkoul@kernel.org>
Thu, 1 Jan 2026 10:24:45 +0000 (15:54 +0530)
commit0287c960b15f27498d85cadf584bb59301ea2382
tree7baba02c86b69d19d88b352ee42b62b7b3d0a4e4
parent8df20813eb01fe29b4507fd470d73675bda3e1dd
phy: core: Reinstate pm_runtime_enabled() check in phy_pm_runtime_put()

On Koelsch (R-Car M2-W), during boot and s2ram:

    phy phy-e6590100.usb-phy-controller.0: Runtime PM usage count underflow!

While phy_pm_runtime_get{,_sync}() and phy_pm_runtime_put_sync() still
contain pm_runtime_enabled() checks, the same check in
phy_pm_runtime_put() was deemed redundant and removed, causing count
underflows with PHY drivers like drivers/phy/renesas/phy-rcar-gen2.c
that do not use Runtime PM yet,

Fix this by reinstating the check.

Fixes: caad07ae07e3fb17 ("phy: core: Discard pm_runtime_put() return values")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3ca9f8166d21685bfbf97535da30172f74822130.1767107014.git.geert+renesas@glider.be
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/phy-core.c