aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2024-08-27 16:44:19 +0200
committerJakub Kicinski <[email protected]>2024-08-28 17:55:23 -0700
commit17555297dbd5bccc93a01516117547e26a61caf1 (patch)
treeb1e602bb09fdf720da367c8d9640b64001c871e9
parent387c415200c3c1099b29446b6e567810bc2dfffc (diff)
net: hisilicon: hip04: fix OF node leak in probe()
Driver is leaking OF node reference from of_parse_phandle_with_fixed_args() in probe(). Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/ethernet/hisilicon/hip04_eth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c
index b91e7a06b97f..beb815e5289b 100644
--- a/drivers/net/ethernet/hisilicon/hip04_eth.c
+++ b/drivers/net/ethernet/hisilicon/hip04_eth.c
@@ -947,6 +947,7 @@ static int hip04_mac_probe(struct platform_device *pdev)
priv->tx_coalesce_timer.function = tx_done;
priv->map = syscon_node_to_regmap(arg.np);
+ of_node_put(arg.np);
if (IS_ERR(priv->map)) {
dev_warn(d, "no syscon hisilicon,hip04-ppe\n");
ret = PTR_ERR(priv->map);