linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] PCI: endpoint: Check correct variable in __pci_epf_mhi_alloc_map()
@ 2023-06-09 10:49 Dan Carpenter
  2023-06-09 10:50 ` [PATCH 2/2] PCI: endpoint: Fix an IS_ERR() vs NULL bug Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dan Carpenter @ 2023-06-09 10:49 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Lorenzo Pieralisi, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Bjorn Helgaas, Damien Le Moal, mhi,
	linux-arm-msm, linux-pci, kernel-janitors

This was intended to check "*vaddr" instead of "vaddr" (without an
asterisk).

Fixes: 7db424a84d96 ("PCI: endpoint: Add PCI Endpoint function driver for MHI bus")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/pci/endpoint/functions/pci-epf-mhi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index 1227f059ea12..e7d64b9d12ff 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -112,7 +112,7 @@ static int __pci_epf_mhi_alloc_map(struct mhi_ep_cntrl *mhi_cntrl, u64 pci_addr,
 	int ret;
 
 	*vaddr = pci_epc_mem_alloc_addr(epc, paddr, size + offset);
-	if (!vaddr)
+	if (!*vaddr)
 		return -ENOMEM;
 
 	ret = pci_epc_map_addr(epc, epf->func_no, epf->vfunc_no, *paddr,
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-14 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-09 10:49 [PATCH 1/2] PCI: endpoint: Check correct variable in __pci_epf_mhi_alloc_map() Dan Carpenter
2023-06-09 10:50 ` [PATCH 2/2] PCI: endpoint: Fix an IS_ERR() vs NULL bug Dan Carpenter
2023-06-09 15:54   ` Manivannan Sadhasivam
2023-06-09 15:50 ` [PATCH 1/2] PCI: endpoint: Check correct variable in __pci_epf_mhi_alloc_map() Manivannan Sadhasivam
2023-06-14 10:42 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).