]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: core: Fix TZ_GET_TRIP NULL pointer dereference
authorNicolas Cavallari <nicolas.cavallari@green-communications.fr>
Mon, 28 Feb 2022 11:03:51 +0000 (12:03 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 1 Mar 2022 15:11:38 +0000 (16:11 +0100)
commit7c52d9bd4735be02a40359e591765d551a69ae1e
treec9ec19c1e84169ce034ba9ac02eef9360998a9e0
parenta4bb3615af56325e357eba8358c36083800642a8
thermal: core: Fix TZ_GET_TRIP NULL pointer dereference

Do not call get_trip_hyst() from thermal_genl_cmd_tz_get_trip() if
the thermal zone does not define one.

Fixes: 259044c38f1f ("thermal: core: genetlink support for events/cmd/sampling")
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Cc: 5.10+ <stable@vger.kernel.org> # 5.10+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/thermal_netlink.c