diff options
author | sos <sos@FreeBSD.org> | 2002-04-05 18:02:33 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2002-04-05 18:02:33 +0000 |
commit | 4059babc8f29e8f02b54eee433bcae1351006167 (patch) | |
tree | 382caf25243c4dc283496f19817f097d6995d857 /sys | |
parent | b9e5e77ee73c3c09618de8418111459a32a009d6 (diff) | |
download | FreeBSD-src-4059babc8f29e8f02b54eee433bcae1351006167.zip FreeBSD-src-4059babc8f29e8f02b54eee433bcae1351006167.tar.gz |
Dont allow to detach twice.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/ata-all.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index b4490eb..5caa2f0 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -215,7 +215,8 @@ ata_detach(device_t dev) struct ata_channel *ch; int s; - if (!dev || !(ch = device_get_softc(dev))) + if (!dev || !(ch = device_get_softc(dev)) || + !ch->r_io || !ch->r_altio || !ch->r_irq) return ENXIO; /* make sure channel is not busy */ |