diff options
| author | Peng Fan <[email protected]> | 2023-07-19 01:16:36 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2023-08-22 19:22:02 +0000 |
| commit | f96801f0cfcefc0a16b146596577c53c75ee9773 (patch) | |
| tree | a3ee4724b389a0148678c4d6a94536eae0db544e /rust/helpers.c | |
| parent | Merge ACPI thermal driver changes for 6.6-rc1. (diff) | |
| download | kernel-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
