Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Don't try to deactivate child if we have no bus ...



details:   https://anonhg.NetBSD.org/src/rev/d934a3dbae18
branches:  trunk
changeset: 519954:d934a3dbae18
user:      augustss <augustss%NetBSD.org@localhost>
date:      Mon Dec 31 12:52:50 2001 +0000

description:
Don't try to deactivate child if we have no bus yet.

diffstat:

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

diffs (27 lines):

diff -r 5ef6c611721d -r d934a3dbae18 sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c       Mon Dec 31 12:37:13 2001 +0000
+++ b/sys/dev/usb/umass.c       Mon Dec 31 12:52:50 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umass.c,v 1.83 2001/12/31 12:15:46 augustss Exp $      */
+/*     $NetBSD: umass.c,v 1.84 2001/12/31 12:52:50 augustss Exp $      */
 /*-
  * Copyright (c) 1999 MAEKAWA Masahide <bishop%rr.iij4u.or.jp@localhost>,
  *                   Nick Hibma <n_hibma%freebsd.org@localhost>
@@ -94,7 +94,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.83 2001/12/31 12:15:46 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.84 2001/12/31 12:52:50 augustss Exp $");
 
 #include "atapibus.h"
 #include "scsibus.h"
@@ -657,7 +657,7 @@
 
        case DVACT_DEACTIVATE:
                sc->sc_dying = 1;
-               if (scbus->sc_child == NULL)
+               if (scbus == NULL || scbus->sc_child == NULL)
                        break;
                rv = config_deactivate(scbus->sc_child);
                DPRINTF(UDMASS_USB, ("%s: umass_activate: child "



Home | Main Index | Thread Index | Old Index