mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
phy: ti: am654: Fix a leak in serdes_am654_probe()
[ Upstream commit 850280156f6421a404f2351bee07a0e7bedfd4c6 ]
If devm_phy_create() fails then we need to call of_clk_del_provider(node)
to undo the call to of_clk_add_provider().
Fixes: 71e2f5c5c2 ("phy: ti: Add a new SERDES driver for TI's AM654x SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200905124648.GA183976@mwanda
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
543ea1af57
commit
ae68b15839
1 changed files with 4 additions and 2 deletions
|
|
@ -625,8 +625,10 @@ static int serdes_am654_probe(struct platform_device *pdev)
|
|||
pm_runtime_enable(dev);
|
||||
|
||||
phy = devm_phy_create(dev, NULL, &ops);
|
||||
if (IS_ERR(phy))
|
||||
return PTR_ERR(phy);
|
||||
if (IS_ERR(phy)) {
|
||||
ret = PTR_ERR(phy);
|
||||
goto clk_err;
|
||||
}
|
||||
|
||||
phy_set_drvdata(phy, am654_phy);
|
||||
phy_provider = devm_of_phy_provider_register(dev, serdes_am654_xlate);
|
||||
|
|
|
|||
Loading…
Reference in a new issue