Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci in ppbdetach(), try to detach the children befor...
details: https://anonhg.NetBSD.org/src/rev/a531d8db18cc
branches: trunk
changeset: 353231:a531d8db18cc
user: chs <chs%NetBSD.org@localhost>
date: Mon Apr 24 23:01:45 2017 +0000
description:
in ppbdetach(), try to detach the children before tearing down our own state,
to avoid trouble if detaching the children fails.
diffstat:
sys/dev/pci/ppb.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 305587ceb8e1 -r a531d8db18cc sys/dev/pci/ppb.c
--- a/sys/dev/pci/ppb.c Mon Apr 24 21:14:32 2017 +0000
+++ b/sys/dev/pci/ppb.c Mon Apr 24 23:01:45 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ppb.c,v 1.57 2017/04/18 05:21:34 msaitoh Exp $ */
+/* $NetBSD: ppb.c,v 1.58 2017/04/24 23:01:45 chs Exp $ */
/*
* Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.57 2017/04/18 05:21:34 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.58 2017/04/24 23:01:45 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -351,6 +351,9 @@
struct ppb_softc *sc = device_private(self);
int rc;
+ if ((rc = config_detach_children(self, flags)) != 0)
+ return rc;
+
/* Detach event counters */
evcnt_detach(&sc->sc_ev_intr);
evcnt_detach(&sc->sc_ev_abp);
@@ -360,8 +363,6 @@
evcnt_detach(&sc->sc_ev_cc);
evcnt_detach(&sc->sc_ev_lacs);
- if ((rc = config_detach_children(self, flags)) != 0)
- return rc;
pmf_device_deregister(self);
return 0;
}
Home |
Main Index |
Thread Index |
Old Index