diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-06 12:04:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-06 12:04:26 +0300 |
commit | a681e6559ce6fe8ca56333f7041d0a0d38aaee94 (patch) | |
tree | 8f369aaa68139cf75a444ac404bae12e52c4ea80 /drivers/i2c/busses/i2c-robotfuzz-osif.c | |
parent | 53c2f13c1ee59c8889bf23ef58653677e3ec1644 (diff) | |
parent | 7b59ab988c01c190f1b528cf750d6f33b738d1e2 (diff) | |
download | linux-a681e6559ce6fe8ca56333f7041d0a0d38aaee94.tar.xz |
Merge v6.15.5
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-robotfuzz-osif.c')
-rw-r--r-- | drivers/i2c/busses/i2c-robotfuzz-osif.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-robotfuzz-osif.c b/drivers/i2c/busses/i2c-robotfuzz-osif.c index 80d45079b763..e0a76fb5bc31 100644 --- a/drivers/i2c/busses/i2c-robotfuzz-osif.c +++ b/drivers/i2c/busses/i2c-robotfuzz-osif.c @@ -111,6 +111,11 @@ static u32 osif_func(struct i2c_adapter *adapter) return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL; } +/* prevent invalid 0-length usb_control_msg */ +static const struct i2c_adapter_quirks osif_quirks = { + .flags = I2C_AQ_NO_ZERO_LEN_READ, +}; + static const struct i2c_algorithm osif_algorithm = { .xfer = osif_xfer, .functionality = osif_func, @@ -143,6 +148,7 @@ static int osif_probe(struct usb_interface *interface, priv->adapter.owner = THIS_MODULE; priv->adapter.class = I2C_CLASS_HWMON; + priv->adapter.quirks = &osif_quirks; priv->adapter.algo = &osif_algorithm; priv->adapter.algo_data = priv; snprintf(priv->adapter.name, sizeof(priv->adapter.name), |