Messages in this thread | | | Date | Thu, 27 Oct 2022 13:46:37 +0100 | From | Sudeep Holla <> | Subject | Re: [PATCH] cacheinfo: Decrement refcount in cache_setup_of_node() |
| |
On Wed, Oct 26, 2022 at 08:59:54PM +0200, Pierre Gondois wrote: > Refcounts to DT nodes are only incremented in the function > and never decremented. Decrease the refcounts when necessary. >
Thanks for fixing this. I had observed this once before but I wasn't sure on of_node_get usage in general. Since we assign and use device_node pointers for comparison later, should be keep the reference or drop it. I still don't know and keep getting such questions whenever I touch anything around device_node reference. IIUC as long as we don't use that you access the node itself, we are safe to drop the reference.
That said, this change looks good to me.
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
-- Regards, Sudeep
| |