diff options
| author | Søren Schmidt <sos@FreeBSD.org> | 2000-03-24 07:44:20 +0000 |
|---|---|---|
| committer | Søren Schmidt <sos@FreeBSD.org> | 2000-03-24 07:44:20 +0000 |
| commit | 8c918526a55466bbce7babb76e0ee3f8c8ec7318 (patch) | |
| tree | 49eb9c0e9b959fe71bd188abe58bdf4ccaaff8ed /sys/dev/ata/atapi-cd.c | |
| parent | 464699d8588381b40755f73fce8a64862d74ef6a (diff) | |
Notes
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
| -rw-r--r-- | sys/dev/ata/atapi-cd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index b34a89915d44..4735d1ad1e0b 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -494,7 +494,7 @@ acdopen(dev_t dev, int32_t flags, int32_t fmt, struct proc *p) return EBUSY; } if (count_dev(dev) == 1) { - if (cdp->slot != cdp->changer_info->current_slot) { + if (cdp->changer_info && cdp->slot != cdp->changer_info->current_slot) { acd_select_slot(cdp); tsleep(&cdp->changer_info, PRIBIO, "acdopn", 0); } @@ -515,7 +515,7 @@ acdclose(dev_t dev, int32_t flags, int32_t fmt, struct proc *p) struct acd_softc *cdp = dev->si_drv1; if (count_dev(dev) == 1) { - if (cdp->slot != cdp->changer_info->current_slot) { + if (cdp->changer_info && cdp->slot != cdp->changer_info->current_slot) { acd_select_slot(cdp); tsleep(&cdp->changer_info, PRIBIO, "acdclo", 0); } @@ -531,7 +531,7 @@ acdioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flags, struct proc *p) struct acd_softc *cdp = dev->si_drv1; int32_t error = 0; - if (cdp->slot != cdp->changer_info->current_slot) { + if (cdp->changer_info && cdp->slot != cdp->changer_info->current_slot) { acd_select_slot(cdp); tsleep(&cdp->changer_info, PRIBIO, "acdctl", 0); } |
