Skip to content

Commit 124dbd7

Browse files
vitor-soares-snpsbbrezillon
authored andcommitted
i3c: master: dw: remove dead code from dw_i3c_master_*_xfers()
Detected by CoverityScan (Event result_independent_of_operands): "(i3c_xfers + i).len > 65536" is always false regardless of the values of its operands. This occurs as the logical operand of "if" "(i2c_xfers + i).len > 65536" is always false regardless of the values of its operands. This occurs as the logical operand of "if" Signed-off-by: Vitor Soares <[email protected]> Signed-off-by: Boris Brezillon <[email protected]>
1 parent 9e98c67 commit 124dbd7

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

drivers/i3c/master/dw-i3c-master.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -840,11 +840,6 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
840840
if (i3c_nxfers > master->caps.cmdfifodepth)
841841
return -ENOTSUPP;
842842

843-
for (i = 0; i < i3c_nxfers; i++) {
844-
if (i3c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX)
845-
return -ENOTSUPP;
846-
}
847-
848843
for (i = 0; i < i3c_nxfers; i++) {
849844
if (i3c_xfers[i].rnw)
850845
nrxwords += DIV_ROUND_UP(i3c_xfers[i].len, 4);
@@ -973,11 +968,6 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
973968
if (i2c_nxfers > master->caps.cmdfifodepth)
974969
return -ENOTSUPP;
975970

976-
for (i = 0; i < i2c_nxfers; i++) {
977-
if (i2c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX)
978-
return -ENOTSUPP;
979-
}
980-
981971
for (i = 0; i < i2c_nxfers; i++) {
982972
if (i2c_xfers[i].flags & I2C_M_RD)
983973
nrxwords += DIV_ROUND_UP(i2c_xfers[i].len, 4);

0 commit comments

Comments
 (0)