mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-20 15:24:25 +00: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=248627
|
@ -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