Module Name:    src
Committed By:   msaitoh
Date:           Mon Sep 29 18:33:21 UTC 2014

Modified Files:
        src/sys/dev/pci [netbsd-6]: ichsmb.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1123):
        sys/dev/pci/ichsmb.c: revision 1.37
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.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.27.2.1 src/sys/dev/pci/ichsmb.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/pci/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.27 src/sys/dev/pci/ichsmb.c:1.27.2.1
--- src/sys/dev/pci/ichsmb.c:1.27	Tue Feb 14 15:08:07 2012
+++ src/sys/dev/pci/ichsmb.c	Mon Sep 29 18:33:21 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.27 2012/02/14 15:08:07 pgoyette Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.27.2.1 2014/09/29 18:33:21 msaitoh 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.27 2012/02/14 15:08:07 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.27.2.1 2014/09/29 18:33:21 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -135,14 +135,14 @@ ichsmb_attach(device_t parent, device_t 
 
 	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;
@@ -177,7 +177,7 @@ ichsmb_attach(device_t parent, device_t 
 	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");
 }
 

Reply via email to