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>
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);
}
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);
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);
}