PCI: rockchip-ep: Fix error code in rockchip_pcie_ep_init_ob_mem()
Subsystems (5)
PATCH v2 1/1 PCI: rockchip-ep: Fix error code in rockchip_pcie_ep_init_ob_mem()
Return -ENOMEM if pci_epc_mem_alloc_addr() fails. Don't return success.
Fixes 945648019466 ("PCI: rockchip-ep: Refactor rockchip_pcie_ep_probe() memory allocations")
Signed-off-by Dan Carpenter <[email protected]>
Reviewed-by Damien Le Moal <[email protected]>
---
v2: Update the git hash for the Fixes tag because the tree was rebased I guess.
drivers/pci/controller/pcie-rockchip-ep.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/controller/pcie-rockchip-ep.c +1 -0
@@ -784,6 +784,7 @@ static int rockchip_pcie_ep_init_ob_mem(struct rockchip_pcie_ep *ep) SZ_1M);if (!ep->irq_cpu_addr) {dev_err (dev,"failed to reserve memory space for MSI\n" ); + err = -ENOMEM ; goto err_epc_mem_exit; }
Signature · 1 line
2.45.2
Quoted 4 lines · Dan Carpenter
Return
-ENOMEMifpci_epc_mem_alloc_addr()fails. Don't return success.Fixes 945648019466 ("PCI: rockchip-ep: Refactor rockchip_pcie_ep_probe() memory allocations")Signed-off-by Dan Carpenter <[email protected]>
Reviewed-by Manivannan Sadhasivam <[email protected]>
- Mani
Quoted 22 lines
Reviewed-by Damien Le Moal <[email protected]>---
v2: Update the git hash for the Fixes tag because the tree was rebased I guess.drivers/pci/controller/pcie-rockchip-ep.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/pcie-rockchip-ep.c +1
-0@@ -784,6 +784,7 @@ static int rockchip_pcie_ep_init_ob_mem(struct rockchip_pcie_ep *ep) SZ_1M);if (!ep->irq_cpu_addr) {dev_err (dev,"failed to reserve memory space for MSI\n" ); + err = -ENOMEM ; goto err_epc_mem_exit; }Signature · 1 line
2.45.2
Signature · 1 line
மணிவண்ணன் சதாசிவம்
Quoted 26 lines · Dan Carpenter
Return
-ENOMEMifpci_epc_mem_alloc_addr()fails. Don't return success.Fixes 945648019466 ("PCI: rockchip-ep: Refactor rockchip_pcie_ep_probe() memory allocations")Signed-off-by Dan Carpenter <[email protected]>Reviewed-by Damien Le Moal <[email protected]>---
v2: Update the git hash for the Fixes tag because the tree was rebased I guess.drivers/pci/controller/pcie-rockchip-ep.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/pcie-rockchip-ep.c +1
-0@@ -784,6 +784,7 @@ static int rockchip_pcie_ep_init_ob_mem(struct rockchip_pcie_ep *ep) SZ_1M);if (!ep->irq_cpu_addr) {dev_err (dev,"failed to reserve memory space for MSI\n" ); + err = -ENOMEM ; goto err_epc_mem_exit; }Signature · 1 line
2.45.2
Reviewed-by Niklas Cassel <[email protected]>
Krzysztof Wilczyński
AppliedHello,
Quoted 1 line
Return
-ENOMEMifpci_epc_mem_alloc_addr()fails. Don't return success.
Applied to controller/rockchip for v6.14, thank you!
Krzysztof