Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pgoyette-localcount]: src/sys/dev Use after initialization, not before
details: https://anonhg.NetBSD.org/src/rev/8be7fb14c7ce
branches: pgoyette-localcount
changeset: 852886:8be7fb14c7ce
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Jul 31 01:32:00 2016 +0000
description:
Use after initialization, not before
diffstat:
sys/dev/ld.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (39 lines):
diff -r 9c66190353ec -r 8be7fb14c7ce sys/dev/ld.c
--- a/sys/dev/ld.c Sun Jul 31 01:28:52 2016 +0000
+++ b/sys/dev/ld.c Sun Jul 31 01:32:00 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ld.c,v 1.94.2.4 2016/07/27 01:13:50 pgoyette Exp $ */
+/* $NetBSD: ld.c,v 1.94.2.5 2016/07/31 01:32:00 pgoyette Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.94.2.4 2016/07/27 01:13:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.94.2.5 2016/07/31 01:32:00 pgoyette Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -627,10 +627,11 @@
ld_config_interrupts(device_t d)
{
struct ld_softc *sc;
- struct dk_softc *dksc = &sc->sc_dksc;
+ struct dk_softc *dksc;
device_acquire(d);
sc = device_private(d);
+ dksc = &sc->sc_dksc;
dkwedge_discover(&dksc->sc_dkdev);
device_release(d);
}
@@ -654,6 +655,7 @@
static int
lddiscard(dev_t dev, off_t pos, off_t len)
{
+ device_t self;
struct ld_softc *sc;
struct dk_softc *dksc;
int unit;
Home |
Main Index |
Thread Index |
Old Index