Re: [PATCH 1/6] cxl/mem: Fix devm_cxl_memdev_edac_release() confusion

From: dan.j.williams

Date: Mon Dec 15 2025 - 16:11:30 EST


Alejandro Lucero Palau wrote:
>
> On 12/4/25 02:21, Dan Williams wrote:
> > A device release method is only for undoing allocations on the path to
> > preparing the device for device_add(). In contrast, devm allocations are
>
>
> Should this not be referencing to device_del() instead?

No, device_del() is not involved in what this patch is addressing. Prior
to device_add() the container of that device is allocated and acquires
some resources. device_add() and device_del() are only registering /
unregistering the device with the device-core. The release method undoes
any resource acquisition done *prior* to device_add().