summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAndrew Thompson <thompsa@FreeBSD.org>2010-12-21 09:33:06 +0000
committerAndrew Thompson <thompsa@FreeBSD.org>2010-12-21 09:33:06 +0000
commit46d47d72ad7056c4e229861b7fad2fbea7c0f419 (patch)
treeb8f62105eb72f1453ec84d06c45d98c23da2e7d3 /sys
parentf99a868145cafd52e4725618165990a9ea2d0ae6 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_conf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index dcca9639b4a58..09859aa89e2d0 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -863,7 +863,7 @@ static void
destroy_devl(struct cdev *dev)
{
struct cdevsw *csw;
- struct cdev_privdata *p, *p1;
+ struct cdev_privdata *p;
mtx_assert(&devmtx, MA_OWNED);
KASSERT(dev->si_flags & SI_NAMED,
@@ -908,7 +908,7 @@ destroy_devl(struct cdev *dev)
dev_unlock();
notify_destroy(dev);
mtx_lock(&cdevpriv_mtx);
- LIST_FOREACH_SAFE(p, &dev->si_priv->cdp_fdpriv, cdpd_list, p1) {
+ while ((p = LIST_FIRST(&dev->si_priv->cdp_fdpriv)) != NULL) {
devfs_destroy_cdevpriv(p);
mtx_lock(&cdevpriv_mtx);
}