Commit 3b71805
committed
cpufreq: Make cpufreq_online() call driver->offline() on errors
In the CPU removal path the ->offline() callback provided by the
driver is always invoked before ->exit(), but in the cpufreq_online()
error path it is not, so ->exit() is expected to somehow know the
context in which it has been called and act accordingly.
That is less than straightforward, so make cpufreq_online() invoke
the driver's ->offline() callback, if present, on errors before
->exit() too.
This only potentially affects intel_pstate.
Fixes: 91a12e9 ("cpufreq: Allow light-weight tear down and bring up of CPUs")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>1 parent 6cbab78 commit 3b71805
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1367 | 1367 | | |
1368 | 1368 | | |
1369 | 1369 | | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
1370 | 1375 | | |
1371 | 1376 | | |
1372 | | - | |
| 1377 | + | |
1373 | 1378 | | |
1374 | 1379 | | |
1375 | 1380 | | |
| |||
1515 | 1520 | | |
1516 | 1521 | | |
1517 | 1522 | | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
1518 | 1527 | | |
1519 | 1528 | | |
1520 | 1529 | | |
| |||
0 commit comments