Message ID | 258e8de1-abff-4024-89e0-1c8df761d790@moroto.mountain |
---|---|
State | New |
Headers | show |
Series | [1/2] PCI: endpoint: Check correct variable in __pci_epf_mhi_alloc_map() | expand |
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,
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(-)