Re: [PATCH v11 10/20] cxl/pci: Introduce config option PCIEAER_CXL

Jonathan Cameron
2023-10-16T14:08:13Z

> >>> diff --git a/drivers/cxl/mem.c b/drivers/cxl/mem.c
> >>> index 04107058739b..61ca21c020fa 100644
> >>> --- a/drivers/cxl/mem.c
> >>> +++ b/drivers/cxl/mem.c
> >>> @@ -157,6 +157,8 @@ static int cxl_mem_probe(struct device *dev)
> >>> else
> >>> endpoint_parent = &parent_port->dev;
> >>>
> >>> + devm_cxl_setup_parent_dport(dev, dport);
> >>
> >> devm calls can always fail (because if nothing else you have to register
> >> some cleanup and that involves an allocation. If you want to ignore
> >> that I'd expect a comment here.
> >>
> >
> > We will add error handling here.
> >
> > Regards,
> > Terry
> >
>
> Found devm_cxl_setup_parent_dport() is a NULL function without return value.
Hmm. Then it's not a devm function.

I went looking and can't find it registering any cleanup so
just rename it to cxl_setup_parent_dport()

>
> Regards,
> Terry