Skip to content

Commit

Permalink
net: hisilicon: hns_mdio: fix OF node leak in probe()
Browse files Browse the repository at this point in the history
[ Upstream commit e62bedd ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
krzk authored and Sasha Levin committed Oct 15, 2024
1 parent 29a2acf commit 0d1a14b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/hisilicon/hns_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,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;
Expand Down

0 comments on commit 0d1a14b

Please sign in to comment.