2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 01:04:08 +08:00

phy: ti: phy-j721e-wiz: fix reference leaks in wiz_probe()

These two error paths need to call of_node_put(child_node) before
returning.

Fixes: edd473d429 ("phy: ti: phy-j721e-wiz: add support for j7200-wiz-10g")
Fixes: 7ae14cf581 ("phy: ti: j721e-wiz: Implement DisplayPort mode to the wiz driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/r/YyxFI8aW23IC/21U@kili
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Dan Carpenter 2022-09-22 14:21:07 +03:00 committed by Vinod Koul
parent 60d9b6aaab
commit a270cc137b

View File

@ -1413,7 +1413,8 @@ static int wiz_probe(struct platform_device *pdev)
if (IS_ERR(wiz->scm_regmap)) {
if (wiz->type == J7200_WIZ_10G) {
dev_err(dev, "Couldn't get ti,scm regmap\n");
return -ENODEV;
ret = -ENODEV;
goto err_addr_to_resource;
}
wiz->scm_regmap = NULL;
@ -1463,7 +1464,7 @@ static int wiz_probe(struct platform_device *pdev)
ret = wiz_get_lane_phy_types(dev, wiz);
if (ret)
return ret;
goto err_addr_to_resource;
wiz->dev = dev;
wiz->regmap = regmap;