sdiahci: prevent nil pointer dereference on spurious interrupt status
on some controllers, we get bogus interrupt indication for non present drives. ack the irq but ignore.
This commit is contained in:
parent
56d9f57dc8
commit
f5ff6d6f34
|
@ -1201,7 +1201,7 @@ iainterrupt(Ureg *u, void *a)
|
|||
cause &= ~m;
|
||||
d = c->rawdrive + i;
|
||||
ilock(d);
|
||||
if(d->port->isr && c->hba->pi & m)
|
||||
if(d->port != nil && d->port->isr && c->hba->pi & m)
|
||||
updatedrive(d);
|
||||
c->hba->isr = m;
|
||||
iunlock(d);
|
||||
|
|
Loading…
Reference in a new issue