Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic slotdata might not be attached, don't use it then.



details:   https://anonhg.NetBSD.org/src/rev/e60078081a59
branches:  trunk
changeset: 450942:e60078081a59
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Wed May 01 07:23:22 2019 +0000

description:
slotdata might not be attached, don't use it then.

diffstat:

 sys/dev/ic/pckbc.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 0b435066e70c -r e60078081a59 sys/dev/ic/pckbc.c
--- a/sys/dev/ic/pckbc.c        Wed May 01 07:17:18 2019 +0000
+++ b/sys/dev/ic/pckbc.c        Wed May 01 07:23:22 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc.c,v 1.59 2016/07/14 10:19:06 msaitoh Exp $ */
+/* $NetBSD: pckbc.c,v 1.60 2019/05/01 07:23:22 mlelstv Exp $ */
 
 /*
  * Copyright (c) 2004 Ben Harris.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.59 2016/07/14 10:19:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc.c,v 1.60 2019/05/01 07:23:22 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -608,7 +608,8 @@
                KBD_DELAY;
                data = bus_space_read_1(t->t_iot, t->t_ioh_d, 0);
 
-               rnd_add_uint32(&q->rnd_source, (stat<<8)|data);
+               if (q != NULL)
+                       rnd_add_uint32(&q->rnd_source, (stat<<8)|data);
 
                pckbportintr(t->t_pt, slot, data);
        }



Home | Main Index | Thread Index | Old Index