Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Register a null pmf handler even if we failed to...



details:   https://anonhg.NetBSD.org/src/rev/aac8e1d1104c
branches:  trunk
changeset: 797040:aac8e1d1104c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 02 19:49:38 2014 +0000

description:
Register a null pmf handler even if we failed to attach.

Keeps ichsmb(4) from preventing suspend even if it's broken because
of ichlpcib(4) grodiness.

diffstat:

 sys/dev/pci/ichsmb.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 898a4f3d1fbc -r aac8e1d1104c sys/dev/pci/ichsmb.c
--- a/sys/dev/pci/ichsmb.c      Wed Jul 02 18:58:42 2014 +0000
+++ b/sys/dev/pci/ichsmb.c      Wed Jul 02 19:49:38 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ichsmb.c,v 1.36 2014/06/09 08:52:43 msaitoh Exp $      */
+/*     $NetBSD: ichsmb.c,v 1.37 2014/07/02 19:49:38 riastradh Exp $    */
 /*     $OpenBSD: ichiic.c,v 1.18 2007/05/03 09:36:26 dlg Exp $ */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.36 2014/06/09 08:52:43 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.37 2014/07/02 19:49:38 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -147,14 +147,14 @@
 
        if ((conf & LPCIB_SMB_HOSTC_HSTEN) == 0) {
                aprint_error_dev(self, "SMBus disabled\n");
-               return;
+               goto out;
        }
 
        /* Map I/O space */
        if (pci_mapreg_map(pa, LPCIB_SMB_BASE, PCI_MAPREG_TYPE_IO, 0,
            &sc->sc_iot, &sc->sc_ioh, NULL, &iosize)) {
                aprint_error_dev(self, "can't map I/O space\n");
-               return;
+               goto out;
        }
 
        sc->sc_poll = 1;
@@ -189,7 +189,7 @@
        iba.iba_tag = &sc->sc_i2c_tag;
        config_found(self, &iba, iicbus_print);
 
-       if (!pmf_device_register(self, NULL, NULL))
+out:   if (!pmf_device_register(self, NULL, NULL))
                aprint_error_dev(self, "couldn't establish power handler\n");
 }
 



Home | Main Index | Thread Index | Old Index