Commit 5a4bbd01 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix memory leaks in pcc_cpufreq_do_osc
  [CPUFREQ] acpi-cpufreq: add missing __percpu markup
parents 989cd445 36829306
...@@ -368,16 +368,22 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle) ...@@ -368,16 +368,22 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle)
return -ENODEV; return -ENODEV;
out_obj = output.pointer; out_obj = output.pointer;
if (out_obj->type != ACPI_TYPE_BUFFER) if (out_obj->type != ACPI_TYPE_BUFFER) {
return -ENODEV; ret = -ENODEV;
goto out_free;
}
errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);
if (errors) if (errors) {
return -ENODEV; ret = -ENODEV;
goto out_free;
}
supported = *((u32 *)(out_obj->buffer.pointer + 4)); supported = *((u32 *)(out_obj->buffer.pointer + 4));
if (!(supported & 0x1)) if (!(supported & 0x1)) {
return -ENODEV; ret = -ENODEV;
goto out_free;
}
out_free: out_free:
kfree(output.pointer); kfree(output.pointer);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment