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.
This commit is contained in:
Justin Hibbits
2026-04-22 18:49:16 -04:00
parent 787b5e1367
commit 0a705587e4
+3 -3
View File
@@ -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