phy: phy-core: increment refcounting variables only on 'success'
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 'power_off' callback succeded and if it failed do not disable the clocks. Change-Id: I8190df3b3febb2b5a7b093df3fd949ede26d7ea4 Reported-by:George Cherian <george.cherian@ti.com> Signed-off-by:
Kishon Vijay Abraham I <kishon@ti.com> Git-commit: 637d378cea0b463c466a61a6564cdd541d689af5 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by:
Yaniv Gardi <ygardi@codeaurora.org>
Loading
Please register or sign in to comment