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

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
...@@ -455,8 +455,10 @@ static int altera_cvp_probe(struct pci_dev *pdev, ...@@ -455,8 +455,10 @@ static int altera_cvp_probe(struct pci_dev *pdev,
mgr = fpga_mgr_create(&pdev->dev, conf->mgr_name, mgr = fpga_mgr_create(&pdev->dev, conf->mgr_name,
&altera_cvp_ops, conf); &altera_cvp_ops, conf);
if (!mgr) if (!mgr) {
return -ENOMEM; ret = -ENOMEM;
goto err_unmap;
}
pci_set_drvdata(pdev, mgr); pci_set_drvdata(pdev, mgr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment