Re: [PATCH net] net: dsa: bcm_sf2: Fix node reference count

From: David Miller
Date: Thu Jun 18 2020 - 23:45:11 EST


From: Florian Fainelli <f.fainelli@xxxxxxxxx>
Date: Wed, 17 Jun 2020 20:42:44 -0700

> of_find_node_by_name() will do an of_node_put() on the "from" argument.
> With CONFIG_OF_DYNAMIC enabled which checks for device_node reference
> counts, we would be getting a warning like this:
...
> Fix this by adding a of_node_get() to increment the reference count
> prior to the call.
>
> Fixes: afa3b592953b ("net: dsa: bcm_sf2: Ensure correct sub-node is parsed")
> Signed-off-by: Florian Fainelli <f.fainelli@xxxxxxxxx>

Applied and queued up for v5.7 -stable, thanks.