aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strncpy-src.c
diff options
context:
space:
mode:
authorVadim Pasternak <[email protected]>2023-08-24 15:43:09 +0200
committerDavid S. Miller <[email protected]>2023-08-25 10:53:37 +0100
commitd7248f1cc835bd80e936dc5b2d94b149bdd0077d (patch)
treeeb19810caf00e5ed47a9c5e6a453b91c9d8d3d57 /lib/test_fortify/write_overflow-strncpy-src.c
parent146c7c330507c0384bf29d567186632bfe975927 (diff)
mlxsw: i2c: Limit single transaction buffer size
Maximum size of buffer is obtained from underlying I2C adapter and in case adapter allows I2C transaction buffer size greater than 100 bytes, transaction will fail due to firmware limitation. As a result driver will fail initialization. Limit the maximum size of transaction buffer by 100 bytes to fit to firmware. Remove unnecessary calculation: max_t(u16, MLXSW_I2C_BLK_DEF, quirk_size). This condition can not happened. Fixes: 3029a693beda ("mlxsw: i2c: Allow flexible setting of I2C transactions size") Signed-off-by: Vadim Pasternak <[email protected]> Reviewed-by: Petr Machata <[email protected]> Signed-off-by: Petr Machata <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions