summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-31 11:45:12 -0400
committerIan Moffett <ian@osmora.org>2024-05-31 11:45:12 -0400
commitd7dc8e3777b6846ae55575b6453e7202570a2acc (patch)
treeba4e12fbed25acbf5fbdfbed4eafbe9ad5eb5363
parent280f43aa8400cbb1ed61ca29e17f487310a4a5cc (diff)
kernel: ahci: Fix null check
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/dev/ic/ahci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index 14dbf74..e7b2b7e 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -314,7 +314,7 @@ ahci_identify(struct ahci_hba *hba, struct hba_port *port)
buf_phys = vm_alloc_pageframe(1);
buf = PHYS_TO_VIRT(buf_phys);
- if (buf == 0) {
+ if (buf_phys == 0) {
status = -ENOMEM;
goto done;
}