diff options
| author | Andrew Goodbody <[email protected]> | 2025-10-21 17:08:27 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-12-04 09:38:16 -0600 |
| commit | ae4f60801f344aa26e3f2d1ffe6f6227be6f16a2 (patch) | |
| tree | da860874d4fe59d12e106b8ce7b69860647aadf6 | |
| parent | 42d30f9447c136d2c1f46c8a12e6058e3cddc3b6 (diff) | |
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 <[email protected]>
Acked-by: Conor Dooley <[email protected]>
| -rw-r--r-- | drivers/clk/microchip/mpfs_clk_cfg.c | 2 | ||||
| -rw-r--r-- | drivers/clk/microchip/mpfs_clk_msspll.c | 2 | ||||
| -rw-r--r-- | drivers/clk/microchip/mpfs_clk_periph.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/microchip/mpfs_clk_cfg.c b/drivers/clk/microchip/mpfs_clk_cfg.c index 7da1fc77120..b64fb6b7193 100644 --- a/drivers/clk/microchip/mpfs_clk_cfg.c +++ b/drivers/clk/microchip/mpfs_clk_cfg.c @@ -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); } diff --git a/drivers/clk/microchip/mpfs_clk_msspll.c b/drivers/clk/microchip/mpfs_clk_msspll.c index d0e7b1ff844..02b4a344467 100644 --- a/drivers/clk/microchip/mpfs_clk_msspll.c +++ b/drivers/clk/microchip/mpfs_clk_msspll.c @@ -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); diff --git a/drivers/clk/microchip/mpfs_clk_periph.c b/drivers/clk/microchip/mpfs_clk_periph.c index b734f49d81a..706d6841ee4 100644 --- a/drivers/clk/microchip/mpfs_clk_periph.c +++ b/drivers/clk/microchip/mpfs_clk_periph.c @@ -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); } |
