diff options
author | Wan Jiabing <wanjiabing@vivo.com> | 2021-10-18 04:32:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-18 15:44:48 +0300 |
commit | d1a7b9e4696584ce05c12567762c18a866837a85 (patch) | |
tree | b256a6c968d53d3860c16009b04f5b039c12afc5 /drivers/net/ethernet | |
parent | d9fd7e9fccfac466fb528a783f2fc76f2982604c (diff) | |
download | linux-d1a7b9e4696584ce05c12567762c18a866837a85.tar.xz |
net: mscc: ocelot: Add of_node_put() before goto
Fix following coccicheck warning:
./drivers/net/ethernet/mscc/ocelot_vsc7514.c:946:1-33: WARNING: Function
for_each_available_child_of_node should have of_node_put() before goto.
Early exits from for_each_available_child_of_node should decrement the
node reference counter.
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot_vsc7514.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot_vsc7514.c b/drivers/net/ethernet/mscc/ocelot_vsc7514.c index 291ae6817c26..d51f799e4e86 100644 --- a/drivers/net/ethernet/mscc/ocelot_vsc7514.c +++ b/drivers/net/ethernet/mscc/ocelot_vsc7514.c @@ -969,6 +969,7 @@ static int mscc_ocelot_init_ports(struct platform_device *pdev, target = ocelot_regmap_init(ocelot, res); if (IS_ERR(target)) { err = PTR_ERR(target); + of_node_put(portnp); goto out_teardown; } |