Source-Changes-HG archive

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

[src/netbsd-6-0]: src/sys/dev/ic Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/fb4e28cbcc32
branches:  netbsd-6-0
changeset: 774689:fb4e28cbcc32
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Nov 22 17:26:37 2012 +0000

description:
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.

diffstat:

 sys/dev/ic/ciss.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r eb5ed149e3d8 -r fb4e28cbcc32 sys/dev/ic/ciss.c
--- a/sys/dev/ic/ciss.c Thu Nov 22 00:34:59 2012 +0000
+++ b/sys/dev/ic/ciss.c Thu Nov 22 17:26:37 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ciss.c,v 1.27 2011/06/20 22:02:55 pgoyette Exp $       */
+/*     $NetBSD: ciss.c,v 1.27.14.1 2012/11/22 17:26:37 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.14.1 2012/11/22 17:26:37 riz Exp $");
 
 #include "bio.h"
 
@@ -1411,6 +1411,10 @@
        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);



Home | Main Index | Thread Index | Old Index