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/[email protected] Fixes: 9456480 ("PCI: rockchip-ep: Refactor rockchip_pcie_ep_probe() memory allocations") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Niklas Cassel <[email protected]>
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)