Re: [PATCH] PM: opp: Fix NULL pointer exception on a v2 table combined with v1 opps

From: Viresh Kumar
Date: Mon Apr 04 2022 - 02:26:30 EST


On 01-04-22, 14:03, Krzysztof Kozlowski wrote:
> dev_pm_opp_add() adds a v1 OPP. If the Devicetree contains an OPP v2
> table with required-opps, but the driver uses dev_pm_opp_add(), the
> table might have required_opp_count!=0 but the opp->required_opps will
> be NULL.

This use-case isn't supported currently, as either all OPPs should
have required-opp or none. This kind of scenario may end up breaking
at other places later on, as I have designed this stuff with the
above assumption.

--
viresh