Re: [PATCH 1/2] OPP: add index check to assert to avoid buffer overflow in _read_freq()

From: Viresh Kumar
Date: Fri Nov 29 2024 - 03:41:04 EST


On 28-11-24, 11:07, Neil Armstrong wrote:
> Pass the freq index to the assert function to make sure
> we do not read a freq out of the opp->rates[] table.
>
> Without that the index value is never checked when called from
> dev_pm_opp_find_freq_exact_indexed() or
> dev_pm_opp_find_freq_ceil/floor_indexed().

These APIs aren't supported for cases where we have more than one clks
available and hence assert for single clk.

--
viresh