mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
clk: microchip: mpfs: Fix error detection
clk_register() will return standard error codes so the use of ERR_PTR() is incorrect. Furthermore the code was ineffective as it lacked a return statement that would have actually made use of the result. Add the return statement and remove the use of ERR_PTR to correct this. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Acked-by: Conor Dooley <conor.dooley@microchip.com>
This commit is contained in:
committed by
Tom Rini
parent
42d30f9447
commit
ae4f60801f
@@ -131,7 +131,7 @@ int mpfs_clk_register_cfgs(struct clk *parent, struct regmap *regmap)
|
||||
name = mpfs_cfg_clks[i].cfg.name;
|
||||
ret = clk_register(hw, MPFS_CFG_CLOCK, name, parent->dev->name);
|
||||
if (ret)
|
||||
ERR_PTR(ret);
|
||||
return ret;
|
||||
id = mpfs_cfg_clks[i].cfg.id;
|
||||
clk_dm(id, hw);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ int mpfs_clk_register_msspll(void __iomem *base, struct clk *parent)
|
||||
name = mpfs_msspll_clks[0].name;
|
||||
ret = clk_register(hw, MPFS_MSSPLL_CLOCK, name, parent->dev->name);
|
||||
if (ret)
|
||||
ERR_PTR(ret);
|
||||
return ret;
|
||||
id = mpfs_msspll_clks[0].id;
|
||||
clk_dm(id, hw);
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ int mpfs_clk_register_periphs(struct udevice *dev, struct regmap *regmap)
|
||||
name = mpfs_periph_clks[i].periph.name;
|
||||
ret = clk_register(hw, MPFS_PERIPH_CLOCK, name, parent.dev->name);
|
||||
if (ret)
|
||||
ERR_PTR(ret);
|
||||
return ret;
|
||||
id = mpfs_periph_clks[i].periph.id;
|
||||
clk_dm(id, hw);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user