diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-11-04 06:42:39 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-11-04 06:42:39 +0100 |
commit | 3f09d4b623b0e47d0f1dc6ced19345c0d9454834 (patch) | |
tree | 325bb0a22ad8a732dec10588c7950df695a06a50 /sys/src/9/pc/archacpi.c | |
parent | f5e45a02d4e1621a9720b3abcadd6b12e7fb4be0 (diff) |
acpi: fix pcibusno() when PCI0._ADR = 0
libaml comresses zero integer as nil, so remove the
nil check. this makes interrupts work in vmware with
efi.
Diffstat (limited to 'sys/src/9/pc/archacpi.c')
-rw-r--r-- | sys/src/9/pc/archacpi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/src/9/pc/archacpi.c b/sys/src/9/pc/archacpi.c index a9482fc83..7f9a52e51 100644 --- a/sys/src/9/pc/archacpi.c +++ b/sys/src/9/pc/archacpi.c @@ -260,9 +260,7 @@ pcibusno(void *dot) if((x = amlwalk(dot, "^_BBN")) == nil) if((x = amlwalk(dot, "^_ADR")) == nil) return -1; - if((p = amlval(x)) == nil) - return -1; - adr = amlint(p); + adr = amlint(amlval(x)); /* if root bridge, then we are done here */ if(id != nil && (strcmp(id, "PNP0A03")==0 || strcmp(id, "PNP0A08")==0)) return adr; |