[PATCH v2 1/2] phy: phy-core: increment refcounting variables only on 'success'

2013-12-19 Thread Kishon Vijay Abraham I
Increment 'init_count' only if the 'init' callback succeeded and decrement 'init_count' only if the 'exit' callback succeded. Increment 'power_count' only if 'power_on' callback succeded and if it failed disable the clocks using phy_pm_runtime_put_sync(). Also decrement 'power_count' only if

[PATCH v2 1/2] phy: phy-core: increment refcounting variables only on 'success'

2013-12-19 Thread Kishon Vijay Abraham I
Increment 'init_count' only if the 'init' callback succeeded and decrement 'init_count' only if the 'exit' callback succeded. Increment 'power_count' only if 'power_on' callback succeded and if it failed disable the clocks using phy_pm_runtime_put_sync(). Also decrement 'power_count' only if