From: Thomas Renninger Date: Wed, 30 Jul 2008 05:32:59 +0000 (-0700) Subject: acpi cpufreq cleanup: move bailing out of function before locking the mutex X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b67c5d48f104aae6118bbb052dd79a15ab9794b;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git acpi cpufreq cleanup: move bailing out of function before locking the mutex Signed-off-by: Thomas Renninger Cc: Andi Kleen Cc: Len Brown Cc: Dave Jones Cc: Ingo Molnar Cc: Venkatesh Pallipadi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index e98071a6481..0133af49cf0 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -95,10 +95,10 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb, if (ignore_ppc) return 0; - mutex_lock(&performance_mutex); - if (event != CPUFREQ_INCOMPATIBLE) - goto out; + return 0; + + mutex_lock(&performance_mutex); pr = per_cpu(processors, policy->cpu); if (!pr || !pr->performance)