]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: add a note about refcounting
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 13 Dec 2021 11:05:13 +0000 (11:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Dec 2021 14:58:07 +0000 (14:58 +0000)
commitcc1acc8e60b4ef0bf28ef2d382c1d5f51a8716e3
tree208da06badcad7d9622ef318504e143d222524ca
parent18806b5073916c44ab728cb9f88c42ceedb179b0
net: phy: add a note about refcounting

Recently, a patch has been submitted to "fix" the refcounting for a DT
node in of_mdiobus_link_mdiodev(). This is not a leaked refcount. The
refcount is passed to the new device.

Sadly, coccicheck identifies this location as a leaked refcount, which
means we're likely to keep getting patches to "fix" this. However,
fixing this will cause breakage. Add a comment to state that the lack
of of_node_put() here is intentional.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c