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

Commit 83c75ddd authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Lorenzo Pieralisi
Browse files

PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures



rcar_pcie_parse_request_of_pci_ranges() can fail and return an error
code, but this is not checked nor handled.

Fix this by adding the missing error handling.

Fixes: 5d2917d4 ("PCI: rcar: Convert to DT resource parsing API")
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
parent 1291a0d5
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1123,7 +1123,9 @@ static int rcar_pcie_probe(struct platform_device *pdev)


	INIT_LIST_HEAD(&pcie->resources);
	INIT_LIST_HEAD(&pcie->resources);


	rcar_pcie_parse_request_of_pci_ranges(pcie);
	err = rcar_pcie_parse_request_of_pci_ranges(pcie);
	if (err)
		goto err_free_bridge;


	err = rcar_pcie_get_resources(pcie);
	err = rcar_pcie_get_resources(pcie);
	if (err < 0) {
	if (err < 0) {
@@ -1178,6 +1180,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)


err_free_resource_list:
err_free_resource_list:
	pci_free_resource_list(&pcie->resources);
	pci_free_resource_list(&pcie->resources);
err_free_bridge:
	pci_free_host_bridge(bridge);
	pci_free_host_bridge(bridge);


	return err;
	return err;