Messages in this thread | | | Subject | Re: nvmem: core: Checking the decrementing of reference counters | From | Markus Elfring <> | Date | Sat, 28 Dec 2019 13:25:49 +0100 |
| |
I have taken another look at the implementation of the function “nvmem_device_release”. https://elixir.bootlin.com/linux/v5.5-rc3/source/drivers/nvmem/core.c#L421 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/nvmem/core.c?id=bf8d1cd4386535004c4afe7f03d37f9864c9940e#n421
Now I wonder why the statement “put_device(&nvmem->dev)” is performed here after it was also executed by the function “__nvmem_device_put” before. How often should the device reference count be decremented (at the end)?
Regards, Markus
| |