Skip to content

Commit

Permalink
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Oct 4, 2010
2 parents 989cd44 + 3682930 commit 5a4bbd0
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,16 +368,22 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle)
return -ENODEV;

out_obj = output.pointer;
if (out_obj->type != ACPI_TYPE_BUFFER)
return -ENODEV;
if (out_obj->type != ACPI_TYPE_BUFFER) {
ret = -ENODEV;
goto out_free;
}

errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0);
if (errors)
return -ENODEV;
if (errors) {
ret = -ENODEV;
goto out_free;
}

supported = *((u32 *)(out_obj->buffer.pointer + 4));
if (!(supported & 0x1))
return -ENODEV;
if (!(supported & 0x1)) {
ret = -ENODEV;
goto out_free;
}

out_free:
kfree(output.pointer);
Expand Down

0 comments on commit 5a4bbd0

Please sign in to comment.