提交 122c5770 编写于 作者: C Christophe Jaillet 提交者: 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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: NMoritz Fischer <mdf@kernel.org>
Acked-by: NAlan Tull <atull@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 a0341fc1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册