]> git.baikalelectronics.ru Git - kernel.git/commit
bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()
authorSuman Anna <s-anna@ti.com>
Tue, 25 Jun 2019 23:33:15 +0000 (18:33 -0500)
committerTony Lindgren <tony@atomide.com>
Tue, 13 Aug 2019 10:38:37 +0000 (03:38 -0700)
commitad86b964f86f758758355527ecd23a1e19aad6c2
treeddc81052fed63c085e45e223c96b5ec3e6177c4f
parent78d063df840da9d110990ab7908a64d9cfd080a4
bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()

The clocks are not yet parsed and prepared until after a successful
sysc_get_clocks(), so there is no need to unprepare the clocks upon
any failure of any of the prior functions in sysc_probe(). The current
code path would have been a no-op because of the clock validity checks
within sysc_unprepare(), but let's just simplify the cleanup path by
returning the error directly.

While at this, also fix the cleanup path for a sysc_init_resets()
failure which is executed after the clocks are prepared.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/bus/ti-sysc.c