Module Name: src Committed By: riz Date: Thu Nov 22 17:24:52 UTC 2012
Modified Files: src/sys/dev/ic [netbsd-6]: ciss.c Log Message: Pull up following revision(s) (requested by chs in ticket #687): sys/dev/ic/ciss.c: revision 1.28 don't try to handle sensors if there aren't any. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.27.8.1 src/sys/dev/ic/ciss.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/ic/ciss.c diff -u src/sys/dev/ic/ciss.c:1.27 src/sys/dev/ic/ciss.c:1.27.8.1 --- src/sys/dev/ic/ciss.c:1.27 Mon Jun 20 22:02:55 2011 +++ src/sys/dev/ic/ciss.c Thu Nov 22 17:24:52 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $ */ +/* $NetBSD: ciss.c,v 1.27.8.1 2012/11/22 17:24:52 riz Exp $ */ /* $OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $ */ /* @@ -19,7 +19,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.27.8.1 2012/11/22 17:24:52 riz Exp $"); #include "bio.h" @@ -1411,6 +1411,10 @@ ciss_create_sensors(struct ciss_softc *s int i; int nsensors = sc->maxunits; + if (nsensors == 0) { + return 0; + } + sc->sc_sme = sysmon_envsys_create(); sc->sc_sensor = malloc(sizeof(envsys_data_t) * nsensors, M_DEVBUF, M_NOWAIT | M_ZERO);