diff options
author | sos <sos@FreeBSD.org> | 2002-04-05 15:58:45 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2002-04-05 15:58:45 +0000 |
commit | 09d26f1006699290f23aa018da24e2c614514c62 (patch) | |
tree | c5814bbbcf9372f6253896409d0ace32a097b004 | |
parent | 88fdbeb725af8d236c196084e55966d2a2a7f802 (diff) | |
download | FreeBSD-src-09d26f1006699290f23aa018da24e2c614514c62.zip FreeBSD-src-09d26f1006699290f23aa018da24e2c614514c62.tar.gz |
Add forgotten ATA_UNLOCK_CH when getting status from non-existing
enclosure.
-rw-r--r-- | sys/dev/ata/ata-all.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 067cf1c..b4490eb 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -384,8 +384,10 @@ ataioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td) id1 = ata_drawersensor(atadev, 0, 0x4f, 0); ata_drawersensor(atadev, 1, 0x4e, 0x80); id2 = ata_drawersensor(atadev, 0, 0x4f, 0); - if (id1 != 0xa3 || id2 != 0x5c) + if (id1 != 0xa3 || id2 != 0x5c) { + ATA_UNLOCK_CH(ch); return ENXIO; + } div = 1 << (((ata_drawersensor(atadev, 0, 0x5d, 0)&0x20)>>3) + ((ata_drawersensor(atadev, 0, 0x47, 0)&0x30)>>4) + 1); |