]> git.baikalelectronics.ru Git - kernel.git/commit
phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove
authorRoger Quadros <rogerq@ti.com>
Thu, 10 Jul 2014 06:25:03 +0000 (11:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jul 2014 01:23:50 +0000 (18:23 -0700)
commit88537036cd77f79ae8bae7e87afddcf9097d02de
treed200444e54061fad1c7209dd6a2716815afa55cb
parentccb110ea2ba5798bdc47a126434760f8867db08e
phy: omap-usb2: Balance pm_runtime_enable() on probe failure and remove

If probe fails then we need to call pm_runtime_disable() to balance
out the previous pm_runtime_enable() call. Else it will cause
unbalanced pm_runtime_enable() call in the succeding probe call.

This anomaly was observed when the call to devm_phy_create() failed
with -EPROBE_DEFER.

Balance out the pm_runtime_enable() call in .remove() as well.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/phy-omap-usb2.c