]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/fpga/altera-hps2fpga.c
Merge branch 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm
[linux.git] / drivers / fpga / altera-hps2fpga.c
index a974d3f60321007443296ff83f52e7e4e23d6c7a..77b95f2518216863bdba6c80c38e329c51912cc5 100644 (file)
@@ -180,7 +180,8 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev)
                }
        }
 
-       br = fpga_bridge_create(dev, priv->name, &altera_hps2fpga_br_ops, priv);
+       br = devm_fpga_bridge_create(dev, priv->name,
+                                    &altera_hps2fpga_br_ops, priv);
        if (!br) {
                ret = -ENOMEM;
                goto err;
@@ -190,12 +191,10 @@ static int alt_fpga_bridge_probe(struct platform_device *pdev)
 
        ret = fpga_bridge_register(br);
        if (ret)
-               goto err_free;
+               goto err;
 
        return 0;
 
-err_free:
-       fpga_bridge_free(br);
 err:
        clk_disable_unprepare(priv->clk);