Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/88cea522269b
branches:  netbsd-6
changeset: 775488:88cea522269b
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Nov 22 17:24:52 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 42c16fa974c7 -r 88cea522269b sys/dev/ic/ciss.c
--- a/sys/dev/ic/ciss.c Thu Nov 22 17:19:56 2012 +0000
+++ b/sys/dev/ic/ciss.c Thu Nov 22 17:24:52 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.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 @@
        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