27 Apr
2019
27 Apr
'19
7:19 p.m.
On Fri, Apr 26, 2019 at 01:59:24PM +0100, Adam Thomson wrote:
/*
* Rounding the rate here avoids failure trying to set a new
* rate on an already enabled wclk. In that instance this will
* just set the same rate as is currently in use, and so should
* continue without problem.
*/
ret = clk_set_rate(wclk, sr); if (ret) { dev_err(component->dev,sr = clk_round_rate(wclk, sr);
Don't we need to validate that the rounded rate is actually viable for the parameters we're trying to set here? If there's missing constraints causing something to try to do something unsupportable then we should return an error rather than silently accept.