Message ID | 258e8de1-abff-4024-89e0-1c8df761d790@moroto.mountain (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Lorenzo Pieralisi |
Headers | show |
Series | [1/2] PCI: endpoint: Check correct variable in __pci_epf_mhi_alloc_map() | expand |
On Fri, Jun 09, 2023 at 01:49:33PM +0300, Dan Carpenter wrote: > 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> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> - Mani > --- > 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 >
On Fri, 09 Jun 2023 13:49:33 +0300, Dan Carpenter wrote: > This was intended to check "*vaddr" instead of "vaddr" (without an > asterisk). > > Squashed in the commit they are fixing, thanks !! Thanks, Lorenzo
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(-)