phy: core: properly handle failure of pm_runtime_get functions
authorFelipe Balbi <balbi@ti.com>
Fri, 20 Dec 2013 21:00:48 +0000 (15:00 -0600)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:47:45 +0000 (11:47 +0900)
commitb56d2f2a6e009fe3015afc856e844d79494b47a9
treeb2af69856f1bb90b58d1166b63529aa642cbabee
parent46cd6a5f9d0b8aa03a0474d75825d494e6c74b06
phy: core: properly handle failure of pm_runtime_get functions

In case pm_runtime_get*() fails, it still
increments pm usage counter, so we *must*
make sure to pm_runtime_put() even in those
cases.

This patch fixes that mistake the same way
usbcore treats those possible failures.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
[backport from upstream commit cedb7f89d1e1f631b7e5d920fe1ea7f742d07f79]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I8de0a4c76c5ad3de2d45996504f3f1aa716dc017
drivers/phy/phy-core.c