Skip to content

Commit 359a218

Browse files
krzkgregkh
authored andcommitted
net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info()
[ Upstream commit 5680cf8 ] Driver is leaking OF node reference from of_parse_phandle_with_fixed_args() in hns_mac_get_info(). 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f62bf4f commit 359a218

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,7 @@ static int hns_mac_get_info(struct hns_mac_cb *mac_cb)
933933
mac_cb->cpld_ctrl = NULL;
934934
} else {
935935
syscon = syscon_node_to_regmap(cpld_args.np);
936+
of_node_put(cpld_args.np);
936937
if (IS_ERR_OR_NULL(syscon)) {
937938
dev_dbg(mac_cb->dev, "no cpld-syscon found!\n");
938939
mac_cb->cpld_ctrl = NULL;

0 commit comments

Comments
 (0)