Skip to contentSkip to conversation

PCI: keystone: Fix error handling when "num-viewport" DT property is not populated

PATCH Applied Kishon Vijay Abraham I 2 participants 2 messages Jan 21, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: keystone: Fix error handling when "num-viewport" DT property is not populated

Fix error handling when "num-viewport" DT property is not populated.

Fixes 23284ad677a94 ("PCI: keystone: Add support for PCIe EP in AM654x Platforms")
---
 drivers/pci/controller/dwc/pci-keystone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/controller/dwc/pci-keystone.c +1 -1
index dbe31589eb61..2c127c321080 100644
@@ -1357,7 +1357,7 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
 		ret = of_property_read_u32(np, "num-viewport", &num_viewport);
 		if (ret < 0) {
 			dev_err(dev, "unable to read *num-viewport* property\n");
-			return ret;
+			goto err_get_sync;
 		}
 
 		/*
Signature · 1 line
2.17.1
#1 lore raw
Quoted 8 lines · Kishon Vijay Abraham I

Fix error handling when "num-viewport" DT property is not populated.

Fixes 23284ad677a94 ("PCI: keystone: Add support for PCIe EP in AM654x Platforms")
---
 drivers/pci/controller/dwc/pci-keystone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to pci/keystone, thanks.

Lorenzo

Quoted 16 lines
drivers/pci/controller/dwc/pci-keystone.c +1 -1
index dbe31589eb61..2c127c321080 100644
@@ -1357,7 +1357,7 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
 		ret = of_property_read_u32(np, "num-viewport", &num_viewport);
 		if (ret < 0) {
 			dev_err(dev, "unable to read *num-viewport* property\n");
-			return ret;
+			goto err_get_sync;
 		}
 
 		/*
Signature · 1 line
2.17.1