Commit d4627a2
cpufreq: Abort show()/store() for half-initialized policies
If policy initialization fails after the sysfs files are created,
there is a possibility to end up running show()/store() callbacks
for half-initialized policies, which may have unpredictable
outcomes.
Abort show()/store() in such a case by making sure the policy is active.
Also dectivate the policy on such failures.
Signed-off-by: Schspa Shi <schspa@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent f339f35 commit d4627a2
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
951 | | - | |
| 951 | + | |
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | | - | |
| 957 | + | |
| 958 | + | |
958 | 959 | | |
959 | 960 | | |
960 | 961 | | |
| |||
965 | 966 | | |
966 | 967 | | |
967 | 968 | | |
968 | | - | |
| 969 | + | |
969 | 970 | | |
970 | 971 | | |
971 | 972 | | |
| |||
979 | 980 | | |
980 | 981 | | |
981 | 982 | | |
982 | | - | |
| 983 | + | |
| 984 | + | |
983 | 985 | | |
984 | 986 | | |
985 | 987 | | |
| |||
1535 | 1537 | | |
1536 | 1538 | | |
1537 | 1539 | | |
| 1540 | + | |
1538 | 1541 | | |
1539 | 1542 | | |
1540 | 1543 | | |
| |||
0 commit comments