summaryrefslogtreecommitdiffstats
path: root/sys/dev/mfi
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2013-03-22 22:46:19 +0000
committerdelphij <delphij@FreeBSD.org>2013-03-22 22:46:19 +0000
commitb1bd4e80c41d3f1bc72bc6ed38ad75e722968322 (patch)
tree458efd149c47571e6719c6f76c3d4efcd5c8948c /sys/dev/mfi
parent93fa1464f28c355009625fdcfd4007c798c20d44 (diff)
downloadFreeBSD-src-b1bd4e80c41d3f1bc72bc6ed38ad75e722968322.zip
FreeBSD-src-b1bd4e80c41d3f1bc72bc6ed38ad75e722968322.tar.gz
Don't attempt to reference sc before testing whether it's NULL.
Submitted by: Sascha Wildner Obtained from: DragonFly MFC after: 2 weeks
Diffstat (limited to 'sys/dev/mfi')
-rw-r--r--sys/dev/mfi/mfi_disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/mfi/mfi_disk.c b/sys/dev/mfi/mfi_disk.c
index 0440bd3..7160b0f 100644
--- a/sys/dev/mfi/mfi_disk.c
+++ b/sys/dev/mfi/mfi_disk.c
@@ -261,7 +261,6 @@ mfi_disk_strategy(struct bio *bio)
struct mfi_softc *controller;
sc = bio->bio_disk->d_drv1;
- controller = sc->ld_controller;
if (sc == NULL) {
bio->bio_error = EINVAL;
@@ -271,6 +270,7 @@ mfi_disk_strategy(struct bio *bio)
return;
}
+ controller = sc->ld_controller;
if (controller->adpreset) {
bio->bio_error = EBUSY;
return;
OpenPOWER on IntegriCloud