aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2026-04-22 22:49:16 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2026-04-30 00:14:19 +0000
commit0a705587e4720cdb0317efb80e9452d236c5cfcf (patch)
treebbd4d646f1b7e6dae548299e7298f38b222044a6
parent787b5e136735e979398bca2057310d0fd594a3bc (diff)
iicmux: Return the right error codes
I2C subsystem errors belong in the IIC_* error space. It's pretty clear this is what is intended in the code.
-rw-r--r--sys/dev/iicbus/mux/iicmux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/iicbus/mux/iicmux.c b/sys/dev/iicbus/mux/iicmux.c
index 96164719577c..32b7405ebe19 100644
--- a/sys/dev/iicbus/mux/iicmux.c
+++ b/sys/dev/iicbus/mux/iicmux.c
@@ -62,7 +62,7 @@ iicmux_callback(device_t dev, int index, caddr_t data)
/* If it's not one of the operations we know about, bail early. */
if (index != IIC_REQUEST_BUS && index != IIC_RELEASE_BUS)
- return (iic2errno(EOPNOTSUPP));
+ return (errno2iic(EOPNOTSUPP));
/*
* Ensure that the data passed to us includes the device_t of the child
@@ -72,12 +72,12 @@ iicmux_callback(device_t dev, int index, caddr_t data)
*/
rd = (struct iic_reqbus_data *)data;
if (!(rd->flags & IIC_REQBUS_DEV))
- return (iic2errno(EINVAL));
+ return (errno2iic(EINVAL));
for (i = 0; i <= sc->maxbus && sc->childdevs[i] != rd->bus; ++i)
continue;
if (i > sc->maxbus)
- return (iic2errno(ENOENT));
+ return (errno2iic(ENOENT));
/*
* If the operation is a release it "cannot fail". Idle the downstream