]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net dsa: qca8k: fix usages of device_get_named_child_node()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 6 Jun 2024 16:13:03 +0000 (19:13 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Jun 2024 12:12:14 +0000 (13:12 +0100)
commitd029edefed39647c797c2710aedd9d31f84c069e
treef531355004a616089af90756121b6c208a12edc8
parentd37fe4255abe8e7b419b90c5847e8ec2b8debb08
net dsa: qca8k: fix usages of device_get_named_child_node()

The documentation for device_get_named_child_node() mentions this
important point:

"
The caller is responsible for calling fwnode_handle_put() on the
returned fwnode pointer.
"

Add fwnode_handle_put() to avoid leaked references.

Fixes: 1e264f9d2918 ("net: dsa: qca8k: add LEDs basic support")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca/qca8k-leds.c