mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Don't attempt to reference sc before testing whether it's NULL.
Submitted by: Sascha Wildner Obtained from: DragonFly MFC after: 2 weeks
This commit is contained in:
parent
776816d32b
commit
843b298e62
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue