PM: EM: Check if the get_cost() callback is present
The em_compute_cost() is going to be re-used in runtime modified EM
code path. Thus, make sure that this common code is safe and won't
try to use the NULL pointer. The former em_compute_cost() didn't have to
care about runtime modification call with. The upcoming changes introduce
such option, with different callback. Those two paths needs to be safely
handled.
Signed-off-by:
Lukasz Luba <lukasz.luba@arm.com>
Loading
Please register or sign in to comment