Skip to content
Commit d721f9bb authored by Tobias Klauser's avatar Tobias Klauser Committed by Greg Kroah-Hartman
Browse files

fpga altera-hps2fpga: disable/unprepare clock on error in alt_fpga_bridge_probe()



If either _alt_hps2fpga_enable_set() or fpga_bridge_register() fail in
alt_fpga_bridge_probe(), the clock remains enabled and prepared. Also,
in the error path for _alt_hps2fpga_enable_set() a call to
fpga_bridge_unregister() is made even though the bridge was not
registered yet.

Remove the unnecessary call to fpga_bridge_unregister() and call
clk_disable_unprepare() in both error paths in order to make sure the
clock gets properly disabled and unprepared.

Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Acked-by: default avatarMoritz Fischer <mdf@kernel.org>
Signed-off-by: default avatarAlan Tull <atull@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 139752a2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment