Skip to content

Commit

Permalink
PCI: rockchip-ep: Fix error code in rockchip_pcie_ep_init_ob_mem()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Krzysztof Wilczyński committed Jan 15, 2025
1 parent 5009696 commit 7ca2887
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/pci/controller/pcie-rockchip-ep.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,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;
}

Expand Down

0 comments on commit 7ca2887

Please sign in to comment.