]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:16:51 +0000 (07:16 +0200)
commit999f33c2438c27895e9798a783d3a2ac5156d78f
tree005f7a74ab00c8929c486ec9bbe87692c382f709
parent1a85d5819adeb09114379d87e1b8edc6a7f151bd
bus: ti-sysc: Simplify cleanup upon failures in sysc_probe()

[ Upstream commit a304f483b6b00d42bde41c45ca52c670945348e2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/bus/ti-sysc.c