Skip to content
Unverified Commit 2324be17 authored by Harshit Mogalapalli's avatar Harshit Mogalapalli Committed by Krzysztof Wilczyński
Browse files

PCI: xilinx-xdma: Fix error code in xilinx_pl_dma_pcie_init_irq_domain()

Currently, if the function irq_domain_add_linear() fails to allocate
a new IRQ domain and returns NULL, we would then still return a success
from the xilinx_pl_dma_pcie_init_irq_domain() function regardless, as
the PTR_ERR(NULL) would return a value of zero.  This is not a desirable
outcome.

Thus, fix the incorrect error code and return the -ENOMEM error code if
the irq_domain_add_linear() fails to allocate a new IRQ domain.

[kwilczynski: commit log]
Link: https://lore.kernel.org/linux-pci/20231030072757.3236546-1-harshit.m.mogalapalli@oracle.com
Fixes: 8d786149

 ("PCI: xilinx-xdma: Add Xilinx XDMA Root Port driver")
Signed-off-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: default avatarKrzysztof Wilczyński <kwilczynski@kernel.org>
parent 7aa5f8fc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment