mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Fix the panic occuring on non-changer devices.
This commit is contained in:
parent
464699d858
commit
8c918526a5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=58527
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user