From d2ae9910bd6d5d4d2bd79cd2c835d6ca1a64364c Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 26 May 2025 01:48:34 -0400 Subject: kernel: ahci: Do not fake success on empty port Signed-off-by: Ian Moffett --- sys/dev/ic/ahci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/dev/ic') diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c index 9a9f896..d88274a 100644 --- a/sys/dev/ic/ahci.c +++ b/sys/dev/ic/ahci.c @@ -363,9 +363,8 @@ hba_port_reset(struct ahci_hba *hba, struct hba_port *port) det = AHCI_PXSCTL_DET(ssts); ipm = AHCI_PXSSTS_IPM(ssts); - /* If there is no device, fake success */ if (det == AHCI_DET_NULL) { - return 0; + return -ENODEV; } if (det != AHCI_DET_COMM) { -- cgit v1.2.3