Skip to content
Commit aaa18ff5 authored by Nícolas F. R. A. Prado's avatar Nícolas F. R. A. Prado Committed by Rafael J. Wysocki
Browse files

thermal: gov_power_allocator: Return early in manage if trip_max is NULL

Commit da781936 ("thermal: gov_power_allocator: Allow binding
without trip points") allowed the governor to bind even when trip_max
is NULL. This allows a NULL pointer dereference to happen in the manage
callback.

Add an early return to prevent it, since the governor is expected to not do
anything in this case.

Fixes: da781936

 ("thermal: gov_power_allocator: Allow binding without trip points")
Signed-off-by: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://patch.msgid.link/20240702-power-allocator-null-trip-max-v1-1-47a60dc55414@collabora.com
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 22a40d14
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment