Commit 9901201
Ulf Hansson
pmdomain: core: Reset genpd->states to avoid freeing invalid data
If genpd_alloc_data() allocates data for the default power-states for the
genpd, let's make sure to also reset the pointer in the error path. This
makes sure a genpd provider driver doesn't end up trying to free the data
again, but using an invalid pointer.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Link: https://lore.kernel.org/r/20250402120613.1116711-1-ulf.hansson@linaro.org1 parent 0a8a888 commit 9901201
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2287 | 2287 | | |
2288 | 2288 | | |
2289 | 2289 | | |
2290 | | - | |
| 2290 | + | |
2291 | 2291 | | |
| 2292 | + | |
| 2293 | + | |
2292 | 2294 | | |
2293 | 2295 | | |
2294 | 2296 | | |
| |||
0 commit comments