Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 122c5770 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Greg Kroah-Hartman
Browse files

fpga: altera-cvp: Fix an error handling path in 'altera_cvp_probe()'



If 'fpga_mgr_create()' fails, we should release some resources, as done
in the other error handling path of the function.

Fixes: 7085e2a9 ("fpga: manager: change api, don't use drvdata")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarMoritz Fischer <mdf@kernel.org>
Acked-by: default avatarAlan Tull <atull@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a0341fc1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -455,8 +455,10 @@ static int altera_cvp_probe(struct pci_dev *pdev,

	mgr = fpga_mgr_create(&pdev->dev, conf->mgr_name,
			      &altera_cvp_ops, conf);
	if (!mgr)
		return -ENOMEM;
	if (!mgr) {
		ret = -ENOMEM;
		goto err_unmap;
	}

	pci_set_drvdata(pdev, mgr);