Module Name: src
Committed By: martin
Date: Wed Feb 12 20:20:15 UTC 2014
Modified Files:
src/sys/kern: subr_cpufreq.c
Log Message:
Unlock correct mutex in an error path.
PR kern/48592 from Kengo NAKAHARA.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/subr_cpufreq.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/subr_cpufreq.c
diff -u src/sys/kern/subr_cpufreq.c:1.8 src/sys/kern/subr_cpufreq.c:1.9
--- src/sys/kern/subr_cpufreq.c:1.8 Thu Oct 27 05:25:07 2011
+++ src/sys/kern/subr_cpufreq.c Wed Feb 12 20:20:15 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_cpufreq.c,v 1.8 2011/10/27 05:25:07 jruoho Exp $ */
+/* $NetBSD: subr_cpufreq.c,v 1.9 2014/02/12 20:20:15 martin Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_cpufreq.c,v 1.8 2011/10/27 05:25:07 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cpufreq.c,v 1.9 2014/02/12 20:20:15 martin Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -361,7 +361,7 @@ cpufreq_get_state_index(uint32_t index,
}
if (index >= cf->cf_state_count) {
- mutex_exit(&cpu_lock);
+ mutex_exit(&cpufreq_lock);
return EINVAL;
}