Hi,
On Mon, Apr 7, 2025 at 10:32 AM Thorsten Blum thorsten.blum@linux.dev wrote:
The of_find_device_by_node() function increments the reference count of the embedded device, which should be released with put_device() when it is no longer needed.
In ill_acc_of_setup(), put_device() is only called on error paths, but not on the success path. Fix this by calling put_device() before returning successfully.
I would think this is very much deliberate as the device is used as the priv argument of the registered IRQ handler. AFAIU as long as that one is live the reference of the device needs to be kept.
Dropping the reference of the device should only be done after freeing/unregistering the IRQ again, which currently never happens.
Best regards, Jonas