diff options
Diffstat (limited to 'drivers/fpga/socfpga.c')
-rw-r--r-- | drivers/fpga/socfpga.c | 10 |
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) | |||
571 | if (ret) | 571 | if (ret) |
572 | return ret; | 572 | return ret; |
573 | 573 | ||
574 | mgr = fpga_mgr_create(dev, "Altera SOCFPGA FPGA Manager", | 574 | mgr = devm_fpga_mgr_create(dev, "Altera SOCFPGA FPGA Manager", |
575 | &socfpga_fpga_ops, priv); | 575 | &socfpga_fpga_ops, priv); |
576 | if (!mgr) | 576 | if (!mgr) |
577 | return -ENOMEM; | 577 | return -ENOMEM; |
578 | 578 | ||
579 | platform_set_drvdata(pdev, mgr); | 579 | platform_set_drvdata(pdev, mgr); |
580 | 580 | ||
581 | ret = fpga_mgr_register(mgr); | 581 | return fpga_mgr_register(mgr); |
582 | if (ret) | ||
583 | fpga_mgr_free(mgr); | ||
584 | |||
585 | return ret; | ||
586 | } | 582 | } |
587 | 583 | ||
588 | static int socfpga_fpga_remove(struct platform_device *pdev) | 584 | static int socfpga_fpga_remove(struct platform_device *pdev) |