phy: rockchip: usbdp: avoid repeat run power off

When phy status is none, it mean that the power off
process is already be run. if the phy power off
function is called again before power on, ignore it.

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: I34c3f2b92076f7c27a1537d3c78000781de61179
This commit is contained in:
Zhang Yubing
2021-12-01 21:37:02 +08:00
committed by Tao Huang
parent 4f8587023c
commit ead5e8f022

View File

@@ -724,6 +724,9 @@ static int udphy_power_off(struct rockchip_udphy *udphy, u8 mode)
return 0;
}
if (!udphy->status)
return 0;
udphy->status &= ~mode;
if (udphy->status == UDPHY_MODE_NONE) {