mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
cpufreq: Fix up conversion to hotplug state machine
The function cpufreq_register_driver() returns zero on success and since commit27622b061e("cpufreq: Convert to hotplug state machine") erroneously a positive number. Due to the "if (x) assume_error" construct all callers assumed an error and as a consequence the cpu freq kworker crashes with a NULL pointer dereference. Reset the return value back to zero in the success case. Fixes:27622b061e("cpufreq: Convert to hotplug state machine") Reported-by: Borislav Petkov <[email protected]> Reported-and-tested-by: Ingo Molnar <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
b067a7be41
commit
5372e054a1
1 changed files with 1 additions and 0 deletions
|
|
@ -2503,6 +2503,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
|
|||
if (ret < 0)
|
||||
goto err_if_unreg;
|
||||
hp_online = ret;
|
||||
ret = 0;
|
||||
|
||||
pr_debug("driver %s up and running\n", driver_data->name);
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in a new issue