Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi Some {} are missing. The behavior is thus wrong...



details:   https://anonhg.NetBSD.org/src/rev/fbc87cb09b10
branches:  trunk
changeset: 793936:fbc87cb09b10
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Mar 01 16:59:41 2014 +0000

description:
Some {} are missing. The behavior is thus wrong: the code always jumps to
out1.

Spotted by my code scanner.

ok christos@

diffstat:

 sys/dev/acpi/tpm_acpi.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 9448d2947b82 -r fbc87cb09b10 sys/dev/acpi/tpm_acpi.c
--- a/sys/dev/acpi/tpm_acpi.c   Sat Mar 01 16:46:14 2014 +0000
+++ b/sys/dev/acpi/tpm_acpi.c   Sat Mar 01 16:59:41 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tpm_acpi.c,v 1.3 2012/01/22 20:25:25 christos Exp $ */
+/* $NetBSD: tpm_acpi.c,v 1.4 2014/03/01 16:59:41 maxv Exp $ */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.3 2012/01/22 20:25:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tpm_acpi.c,v 1.4 2014/03/01 16:59:41 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -185,9 +185,10 @@
        else
                inum = irq->ar_irq;
 
-       if ((rv = (*sc->sc_init)(sc, inum, device_xname(sc->sc_dev))) != 0)
+       if ((rv = (*sc->sc_init)(sc, inum, device_xname(sc->sc_dev))) != 0) {
                aprint_error_dev(sc->sc_dev, "cannot init device %d\n", rv);
                goto out1;
+       }
 
        if (inum != -1 &&
            (sc->sc_ih = isa_intr_establish(aa->aa_ic, irq->ar_irq,



Home | Main Index | Thread Index | Old Index