2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00

net: sparx5: Add of_node_put() before goto

Fix following coccicheck warning:
./drivers/net/ethernet/microchip/sparx5/s4parx5_main.c:723: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>
This commit is contained in:
Wan Jiabing 2021-10-17 21:31:30 -04:00 committed by David S. Miller
parent 2dc4e9e88c
commit d9fd7e9fcc

View File

@ -758,6 +758,7 @@ static int mchp_sparx5_probe(struct platform_device *pdev)
err = dev_err_probe(sparx5->dev, PTR_ERR(serdes), err = dev_err_probe(sparx5->dev, PTR_ERR(serdes),
"port %u: missing serdes\n", "port %u: missing serdes\n",
portno); portno);
of_node_put(portnp);
goto cleanup_config; goto cleanup_config;
} }
config->portno = portno; config->portno = portno;