Commit b8f8583
cpufreq: exit() callback is optional
The exit() callback is optional and shouldn't be called without checking
a valid pointer first.
Also, we must clear freq_table pointer even if the exit() callback isn't
present.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Fixes: 91a12e9 ("cpufreq: Allow light-weight tear down and bring up of CPUs")
Fixes: f339f35 ("cpufreq: Rearrange locking in cpufreq_remove_dev()")
Reported-by: Lizhe <sensor1010@163.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent 5196123 commit b8f8583
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1679 | 1679 | | |
1680 | 1680 | | |
1681 | 1681 | | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
| 1682 | + | |
1685 | 1683 | | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
1686 | 1689 | | |
1687 | 1690 | | |
1688 | 1691 | | |
| |||
1740 | 1743 | | |
1741 | 1744 | | |
1742 | 1745 | | |
1743 | | - | |
| 1746 | + | |
1744 | 1747 | | |
1745 | 1748 | | |
1746 | 1749 | | |
| |||
0 commit comments