mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-25 17:53:34 -05:00
fpga: socfpga-a10: disable clk on error in socfpga_a10_fpga_probe()
If fpga_mgr_register() fails, a clock is left undisabled. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Reviewed-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: Alan Tull <atull@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8d52af6795
commit
d9cc5a0edb
1 changed files with 7 additions and 1 deletions
|
@ -519,8 +519,14 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev)
|
|||
return -EBUSY;
|
||||
}
|
||||
|
||||
return fpga_mgr_register(dev, "SoCFPGA Arria10 FPGA Manager",
|
||||
ret = fpga_mgr_register(dev, "SoCFPGA Arria10 FPGA Manager",
|
||||
&socfpga_a10_fpga_mgr_ops, priv);
|
||||
if (ret) {
|
||||
clk_disable_unprepare(priv->clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int socfpga_a10_fpga_remove(struct platform_device *pdev)
|
||||
|
|
Loading…
Add table
Reference in a new issue