phy: core: fix wrong err handle for phy_power_on
authorShawn Lin <shawn.lin@rock-chips.com>
Thu, 28 Jan 2016 08:14:18 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:28 +0000 (15:07 -0800)
commitbe683dfd4c253e11a8e9d9263f5dd0fed8c21de3
treeb7720252f8c4bf2add512532062e8e1d40d99395
parent7c465723d0b6f2621f6c712035b117d744a51a8b
phy: core: fix wrong err handle for phy_power_on

commit b82fcabe212a11698fd4b3e604d2f81d929d22f6 upstream.

If phy_pm_runtime_get_sync failed but we already
enable regulator, current code return directly without
doing regulator_disable. This patch fix this problem
and cleanup err handle of phy_power_on to be more readable.

Fixes: 3be88125d85d ("phy: core: Support regulator ...")
Cc: Roger Quadros <rogerq@ti.com>
Cc: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/phy-core.c