Module Name: src
Committed By: bouyer
Date: Thu Mar 15 16:19:02 UTC 2012
Modified Files:
src/sys/dev/acpi: fujbp_acpi.c
Log Message:
Do not use uninitialized level if fujitsu_bp_get_brightness() returned
an error; from gcc -O3 (completely harmless in this case though).
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/acpi/fujbp_acpi.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/dev/acpi/fujbp_acpi.c
diff -u src/sys/dev/acpi/fujbp_acpi.c:1.1 src/sys/dev/acpi/fujbp_acpi.c:1.2
--- src/sys/dev/acpi/fujbp_acpi.c:1.1 Sun Feb 20 08:31:46 2011
+++ src/sys/dev/acpi/fujbp_acpi.c Thu Mar 15 16:19:02 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: fujbp_acpi.c,v 1.1 2011/02/20 08:31:46 jruoho Exp $ */
+/* $NetBSD: fujbp_acpi.c,v 1.2 2012/03/15 16:19:02 bouyer Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fujbp_acpi.c,v 1.1 2011/02/20 08:31:46 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fujbp_acpi.c,v 1.2 2012/03/15 16:19:02 bouyer Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -437,12 +437,12 @@ fujitsu_bp_sysctl_brightness(SYSCTLFN_AR
mutex_enter(&sc->sc_mtx);
error = fujitsu_bp_get_brightness(sc, &level);
- val = (int)level;
mutex_exit(&sc->sc_mtx);
if (error)
return error;
+ val = (int)level;
node.sysctl_data = &val;
error = sysctl_lookup(SYSCTLFN_CALL(&node));
if (error || newp == NULL)