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)
committerKishon Vijay Abraham I <kishon@ti.com>
Wed, 10 Feb 2016 06:15:41 +0000 (11:45 +0530)
commitb82fcabe212a11698fd4b3e604d2f81d929d22f6
treeb41eac1f9d5cc25472d465092744cc0b30d6800b
parentd896910f381737a139686eb3fa9e1c7ce8f59e52
phy: core: fix wrong err handle for phy_power_on

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: <stable@vger.kernel.org> # v3.18+
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>
drivers/phy/phy-core.c