Commit 39cdf87
cpuidle: psci: Fix uninitialized variable in dt_idle_state_present()
If the first cpu_node = of_cpu_device_node_get() fails then the cleanup.h
code will try to free "state_node" but it hasn't been initialized yet.
Declare the device_nodes where they are initialized to fix this.
Fixes: 5836ebe ("cpuidle: psci: Avoid initializing faux device if no DT idle states are present")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Rafael J. Wysocki <[email protected]>1 parent 5836ebe commit 39cdf87
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
| 443 | + | |
| 444 | + | |
447 | 445 | | |
448 | 446 | | |
449 | 447 | | |
450 | | - | |
| 448 | + | |
| 449 | + | |
451 | 450 | | |
452 | 451 | | |
453 | 452 | | |
| |||
0 commit comments