Source-Changes-HG archive

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

[src/netbsd-2]: src/sys/dev/ic Apply patch (requested by bouyer in ticket #56...



details:   https://anonhg.NetBSD.org/src/rev/3f79021e360f
branches:  netbsd-2
changeset: 563998:3f79021e360f
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Aug 23 13:35:55 2005 +0000

description:
Apply patch (requested by bouyer in ticket #5605):
On NetBSD 2.x chp->ch_wdc can be NULL in some case, check for this.
This avoids panics in wdcprobe().

diffstat:

 sys/dev/ic/wdc.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8c28971df281 -r 3f79021e360f sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Tue Aug 23 13:32:26 2005 +0000
+++ b/sys/dev/ic/wdc.c  Tue Aug 23 13:35:55 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc.c,v 1.172.2.7.2.9 2005/08/23 13:07:31 tron Exp $ */
+/*     $NetBSD: wdc.c,v 1.172.2.7.2.10 2005/08/23 13:35:55 tron Exp $ */
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.  All rights reserved.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.172.2.7.2.9 2005/08/23 13:07:31 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.172.2.7.2.10 2005/08/23 13:35:55 tron Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -486,7 +486,7 @@
 {
        struct wdc_softc *wdc = chp->ch_wdc;
        /* default reset method */
-       if (wdc->reset == NULL)
+       if (wdc != NULL && wdc->reset == NULL)
                wdc->reset = wdc_do_reset;
 
        return (wdcprobe1(chp, 1));



Home | Main Index | Thread Index | Old Index