summaryrefslogtreecommitdiff
path: root/drivers/fpga/socfpga.c
diff options
context:
space:
mode:
authorAlan Tull <atull@kernel.org>2018-10-16 01:20:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-16 12:13:50 +0300
commit084181fe8cc7472695b907f0018f4cd00934cb12 (patch)
tree812b6c10de92d91bccfdec2da621abacc2745c4d /drivers/fpga/socfpga.c
parent1c87dc897b8c8ace3aa4480fa29ef6439dabb3ab (diff)
downloadlinux-084181fe8cc7472695b907f0018f4cd00934cb12.tar.xz
fpga: mgr: add devm_fpga_mgr_create
Add devm_fpga_mgr_create() which is the managed version of fpga_mgr_create(). Change current FPGA manager drivers to use devm_fpga_mgr_create() Signed-off-by: Alan Tull <atull@kernel.org> Suggested-by: Federico Vaga <federico.vaga@cern.ch> Acked-by: Moritz Fischer <mdf@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga/socfpga.c')
-rw-r--r--drivers/fpga/socfpga.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/fpga/socfpga.c b/drivers/fpga/socfpga.c
index 959d71f26896..4a8a2fcd4e6c 100644
--- a/drivers/fpga/socfpga.c
+++ b/drivers/fpga/socfpga.c
@@ -571,18 +571,14 @@ static int socfpga_fpga_probe(struct platform_device *pdev)
if (ret)
return ret;
- mgr = fpga_mgr_create(dev, "Altera SOCFPGA FPGA Manager",
- &socfpga_fpga_ops, priv);
+ mgr = devm_fpga_mgr_create(dev, "Altera SOCFPGA FPGA Manager",
+ &socfpga_fpga_ops, priv);
if (!mgr)
return -ENOMEM;
platform_set_drvdata(pdev, mgr);
- ret = fpga_mgr_register(mgr);
- if (ret)
- fpga_mgr_free(mgr);
-
- return ret;
+ return fpga_mgr_register(mgr);
}
static int socfpga_fpga_remove(struct platform_device *pdev)