summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/sdiahci.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-02-22 12:23:01 +0100
committercinap_lenrek <cinap_lenrek@gmx.de>2013-02-22 12:23:01 +0100
commitf5ff6d6f34e2cab60722a8a2e8444436c969bfeb (patch)
treeb7309d51cbb708cd46ac7da2f0c46a0faccfaf0a /sys/src/9/pc/sdiahci.c
parent56d9f57dc8afd8ef4c6d54a10c958446dd2d7fbe (diff)
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.
Diffstat (limited to 'sys/src/9/pc/sdiahci.c')
-rw-r--r--sys/src/9/pc/sdiahci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/pc/sdiahci.c b/sys/src/9/pc/sdiahci.c
index 8db494b42..6657785df 100644
--- a/sys/src/9/pc/sdiahci.c
+++ b/sys/src/9/pc/sdiahci.c
@@ -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);