svn commit: r185434 - head/sys/dev/k8temp

Rui Paulo rpaulo at FreeBSD.org
Sat Nov 29 06:26:22 PST 2008


Author: rpaulo
Date: Sat Nov 29 14:26:22 2008
New Revision: 185434
URL: http://svn.freebsd.org/changeset/base/185434

Log:
  Check the return value of config_intrhook_establish().
  
  Found with:	Coverity Prevent(tm)
  CID:		2115

Modified:
  head/sys/dev/k8temp/k8temp.c

Modified: head/sys/dev/k8temp/k8temp.c
==============================================================================
--- head/sys/dev/k8temp/k8temp.c	Sat Nov 29 14:20:36 2008	(r185433)
+++ head/sys/dev/k8temp/k8temp.c	Sat Nov 29 14:26:22 2008	(r185434)
@@ -187,7 +187,11 @@ k8temp_attach(device_t dev)
 	 */
 	sc->sc_ich.ich_func = k8temp_intrhook;
 	sc->sc_ich.ich_arg = dev;
-	config_intrhook_establish(&sc->sc_ich);
+	if (config_intrhook_establish(&sc->sc_ich) != 0) {
+		device_printf(dev, "config_intrhook_establish "
+		    "failed!\n");
+		return (ENXIO);
+	}
 	
 	/*
 	 * dev.k8temp.N tree.


More information about the svn-src-all mailing list