Skip to content

Commit

Permalink
habanalabs: Fix an error handling path in 'hl_pci_probe()'
Browse files Browse the repository at this point in the history
[ Upstream commit 3002f46 ]

If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it
must be undone by a corresponding 'pci_disable_pcie_error_reporting()'
call, as already done in the remove function.

Fixes: 2e5eda4 ("habanalabs: PCIe Advanced Error Reporting support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tititiou36 authored and gregkh committed Jul 14, 2021
1 parent 51f5511 commit 9efd7a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/misc/habanalabs/common/habanalabs_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ static int hl_pci_probe(struct pci_dev *pdev,
return 0;

disable_device:
pci_disable_pcie_error_reporting(pdev);
pci_set_drvdata(pdev, NULL);
destroy_hdev(hdev);

Expand Down

0 comments on commit 9efd7a6

Please sign in to comment.