diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-08-27 16:44:21 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-29 02:55:24 +0200 |
commit | e62beddc45f487b9969821fad3a0913d9bc18a2f (patch) | |
tree | 87c3535c2b65553d44b03f1e1c80c7da18b5cacf | |
parent | net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() (diff) | |
download | linux-e62beddc45f487b9969821fad3a0913d9bc18a2f.tar.xz linux-e62beddc45f487b9969821fad3a0913d9bc18a2f.zip |
net: hisilicon: hns_mdio: 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 <krzysztof.kozlowski@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240827144421.52852-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns_mdio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c index ed73707176c1..8a047145f0c5 100644 --- a/drivers/net/ethernet/hisilicon/hns_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns_mdio.c @@ -575,6 +575,7 @@ static int hns_mdio_probe(struct platform_device *pdev) MDIO_SC_RESET_ST; } } + of_node_put(reg_args.np); } else { dev_warn(&pdev->dev, "find syscon ret = %#x\n", ret); mdio_dev->subctrl_vbase = NULL; |