Skip to contentSkip to conversation

Patch "PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures" has been added to the 4.14-stable tree

PATCH [email protected] 1 participant 1 message Mar 22, 2018

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures

to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
pci-rcar-handle-rcar_pcie_parse_request_of_pci_ranges-failures.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Mar 22 14:26:48 CET 2018

From: Geert Uytterhoeven <[email protected]>
Date: Thu, 7 Dec 2017 11:15:20 +0100
Subject: PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures

From: Geert Uytterhoeven <[email protected]>

[ Upstream commit 83c75ddd816e979802bd244ad494139f28152921 ]

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 5d2917d469faab72 ("PCI: rcar: Convert to DT resource parsing API")
---
 drivers/pci/host/pcie-rcar.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pci/host/pcie-rcar.c +4 -1
@@ -1141,7 +1141,9 @@ static int rcar_pcie_probe(struct platfo
 
 	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);
 	if (err < 0) {
@@ -1196,6 +1198,7 @@ err_pm_disable:
 
 err_free_resource_list:
 	pci_free_resource_list(&pcie->resources);
+err_free_bridge:
 	pci_free_host_bridge(bridge);
 
 	return err;

Patches currently in stable-queue which might be from [email protected] are

queue-4.14/spi-sh-msiof-avoid-writing-to-registers-from-spi_master.setup.patch queue-4.14/pci-rcar-handle-rcar_pcie_parse_request_of_pci_ranges-failures.patch