mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Dont allow to detach twice.
This commit is contained in:
parent
de4dc9595e
commit
111ab6f7ed
1 changed files with 2 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue