Skip to content
Commit 572af9f2 authored by Joe Hattori's avatar Joe Hattori Committed by Paolo Abeni
Browse files

net: mdiobus: fix an OF node reference leak



fwnode_find_mii_timestamper() calls of_parse_phandle_with_fixed_args()
but does not decrement the refcount of the obtained OF node. Add an
of_node_put() call before returning from the function.

This bug was detected by an experimental static analysis tool that I am
developing.

Fixes: bc1bee3b ("net: mdiobus: Introduce fwnode_mdiobus_register_phy()")
Signed-off-by: default avatarJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20241218035106.1436405-1-joe@pf.is.s.u-tokyo.ac.jp


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent b4adc049
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment