Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/algor/pci Only call through the function pointer if...



details:   https://anonhg.NetBSD.org/src/rev/aea422126ff2
branches:  trunk
changeset: 511579:aea422126ff2
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 22 01:42:20 2001 +0000

description:
Only call through the function pointer if it's not NULL.

diffstat:

 sys/arch/algor/pci/pciide_machdep.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 9c5f73b14328 -r aea422126ff2 sys/arch/algor/pci/pciide_machdep.c
--- a/sys/arch/algor/pci/pciide_machdep.c       Fri Jun 22 01:29:26 2001 +0000
+++ b/sys/arch/algor/pci/pciide_machdep.c       Fri Jun 22 01:42:20 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pciide_machdep.c,v 1.1 2001/05/28 16:22:21 thorpej Exp $       */
+/*     $NetBSD: pciide_machdep.c,v 1.2 2001/06/22 01:42:20 thorpej Exp $       */
 
 /*
  * Copyright (c) 1998 Christopher G. Demetriou.  All rights reserved.
@@ -42,7 +42,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pciide_machdep.c,v 1.1 2001/05/28 16:22:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pciide_machdep.c,v 1.2 2001/06/22 01:42:20 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -61,6 +61,8 @@
 {
        pci_chipset_tag_t pc = pa->pa_pc;
 
+       if (pc->pc_pciide_compat_intr_establish == NULL)
+               return (NULL);
        return (algor_pciide_compat_intr_establish(pc, dev, pa, chan,
            func, arg));
 }



Home | Main Index | Thread Index | Old Index