From 92d69b5538cc0828fc33e88fccb49ec62717133d Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 26 May 2025 01:46:25 -0400 Subject: kernel: ahci: Fix operator in dev_max check Signed-off-by: Ian Moffett --- sys/dev/ic/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/ic') diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c index ac92b99..53113e7 100644 --- a/sys/dev/ic/ahci.c +++ b/sys/dev/ic/ahci.c @@ -634,7 +634,7 @@ sata_dev_rw(dev_t dev, struct sio_txn *sio, bool write) if (sio->len == 0 || sio->buf == NULL) { return -EINVAL; } - if (dev >= devs_max) { + if (dev > devs_max) { return -ENODEV; } -- cgit v1.2.3