]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: dwc: ep: Return -ENOMEM for allocation failures
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 5 Mar 2025 15:00:07 +0000 (18:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:16 +0000 (14:39 +0200)
commitb004cf517d8e9efadb0ba35cbae20067b59972a0
tree41c2717053b22f02c0ac4108a537e358edab7c4c
parent3453bcaf2ca92659346bf8504c2b52b3993fbd79
PCI: dwc: ep: Return -ENOMEM for allocation failures

[ Upstream commit 8189aa56dbed0bfb46b7b30d4d231f57ab17b3f4 ]

If the bitmap or memory allocations fail, then dw_pcie_ep_init_registers()
will incorrectly return a success.

Return -ENOMEM instead.

Fixes: 869bc5253406 ("PCI: dwc: ep: Fix DBI access failure for drivers requiring refclk from host")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: Krzysztof Wilczyński <kw@linux.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/36dcb6fc-f292-4dd5-bd45-a8c6f9dc3df7@stanley.mountain
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/controller/dwc/pcie-designware-ep.c