diff options
author | Suman Anna <s-anna@ti.com> | 2019-06-25 18:33:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-21 07:18:27 +0200 |
commit | 0a3d2a039339b446cd8f901e65a5843a2962db3a (patch) | |
tree | 396e26e079ec82a1e2466d3266ded0f93a5b7df8 | |
parent | e92814b0aae18a95fe6c5e7002b32fa9aaa0a640 (diff) | |
download | linux-stable-0a3d2a039339b446cd8f901e65a5843a2962db3a.tar.gz linux-stable-0a3d2a039339b446cd8f901e65a5843a2962db3a.tar.bz2 linux-stable-0a3d2a039339b446cd8f901e65a5843a2962db3a.zip |
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>
-rw-r--r-- | drivers/bus/ti-sysc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 58b38630171f..0d122440d111 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -2079,27 +2079,27 @@ static int sysc_probe(struct platform_device *pdev) error = sysc_init_dts_quirks(ddata); if (error) - goto unprepare; + return error; error = sysc_map_and_check_registers(ddata); if (error) - goto unprepare; + return error; error = sysc_init_sysc_mask(ddata); if (error) - goto unprepare; + return error; error = sysc_init_idlemodes(ddata); if (error) - goto unprepare; + return error; error = sysc_init_syss_mask(ddata); if (error) - goto unprepare; + return error; error = sysc_init_pdata(ddata); if (error) - goto unprepare; + return error; sysc_init_early_quirks(ddata); @@ -2109,7 +2109,7 @@ static int sysc_probe(struct platform_device *pdev) error = sysc_init_resets(ddata); if (error) - return error; + goto unprepare; error = sysc_init_module(ddata); if (error) |