Skip to content

Commit 0a94777

Browse files
krzkgregkh
authored andcommitted
net: hisilicon: hns_mdio: fix OF node leak in probe()
[ Upstream commit e62bedd ] 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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 359a218 commit 0a94777

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/hisilicon/hns_mdio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ static int hns_mdio_probe(struct platform_device *pdev)
575575
MDIO_SC_RESET_ST;
576576
}
577577
}
578+
of_node_put(reg_args.np);
578579
} else {
579580
dev_warn(&pdev->dev, "find syscon ret = %#x\n", ret);
580581
mdio_dev->subctrl_vbase = NULL;

0 commit comments

Comments
 (0)