aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers.c
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2023-07-19 01:16:36 +0000
committerRafael J. Wysocki <[email protected]>2023-08-22 19:22:02 +0000
commitf96801f0cfcefc0a16b146596577c53c75ee9773 (patch)
treea3ee4724b389a0148678c4d6a94536eae0db544e /rust/helpers.c
parentMerge ACPI thermal driver changes for 6.6-rc1. (diff)
downloadkernel-f96801f0cfcefc0a16b146596577c53c75ee9773.tar.gz
kernel-f96801f0cfcefc0a16b146596577c53c75ee9773.zip
thermal/of: Fix potential uninitialized value access
If of_parse_phandle_with_args() called from __thermal_of_bind() or __thermal_of_unbind() fails, cooling_spec.np will not be initialized, so move the of_node_put() calls below the respective return value checks to avoid dereferencing an uninitialized pointer. Fixes: 3fd6d6e2b4e8 ("thermal/of: Rework the thermal device tree initialization") Signed-off-by: Peng Fan <[email protected]> [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'rust/helpers.c')
0 files changed, 0 insertions, 0 deletions