Skip to content

Commit 1057c4c

Browse files
TravMuravrafaeljw
authored andcommitted
thermal: gov_power_allocator: Allow binding without cooling devices
IPA was recently refactored to split out memory allocation into a separate funciton. That funciton was made to return -EINVAL if there is zero power_actors and thus no memory to allocate. This causes IPA to fail probing when the thermal zone has no attached cooling devices. Since cooling devices can attach after the thermal zone is created and the governer is attached to it, failing probe due to the lack of cooling devices is incorrect. Change the allocate_actors_buffer() to return success when there is no cooling devices present. Fixes: 912e97c ("thermal: gov_power_allocator: Move memory allocation out of throttle()") Signed-off-by: Nikita Travkin <[email protected]> Reviewed-by: Lukasz Luba <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 39cd87c commit 1057c4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/gov_power_allocator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ static int allocate_actors_buffer(struct power_allocator_params *params,
606606

607607
/* There might be no cooling devices yet. */
608608
if (!num_actors) {
609-
ret = -EINVAL;
609+
ret = 0;
610610
goto clean_state;
611611
}
612612

0 commit comments

Comments
 (0)