Skip to content

Commit 7ca2887

Browse files
Dan Carpenterkwilczynski
authored andcommitted
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. Link: https://lore.kernel.org/r/Z014ylYz_xrrgI4W@stanley.mountain Fixes: 9456480 ("PCI: rockchip-ep: Refactor rockchip_pcie_ep_probe() memory allocations") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Niklas Cassel <cassel@kernel.org>
1 parent 5009696 commit 7ca2887

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/pci/controller/pcie-rockchip-ep.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,7 @@ static int rockchip_pcie_ep_init_ob_mem(struct rockchip_pcie_ep *ep)
788788
SZ_1M);
789789
if (!ep->irq_cpu_addr) {
790790
dev_err(dev, "failed to reserve memory space for MSI\n");
791+
err = -ENOMEM;
791792
goto err_epc_mem_exit;
792793
}
793794

0 commit comments

Comments
 (0)