mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
i3c: master: Remove stale GETSTATUS length check
i3c_master_getstatus_locked() verifies dest.payload.len against sizeof(*getstatus) after issuing a GETSTATUS CCC. This check predates the introduction of dest.payload.actual_len. Since then, dest.payload.len has held the requested transfer length and dest.payload.actual_len has held the received length, so the check is always false and can never detect a short response. It also predates the addition of generic read CCC response length validation in i3c_master_send_ccc_cmd_locked(), which now performs the necessary check before returning success. Remove the stale check. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20260920151248.46936-6-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
25648fb7ce
commit
48d7187c98
|
|
@ -1777,11 +1777,6 @@ static int i3c_master_getstatus_locked(struct i3c_master_controller *master,
|
|||
if (ret)
|
||||
goto out;
|
||||
|
||||
if (dest.payload.len != sizeof(*getstatus)) {
|
||||
ret = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (status)
|
||||
*status = be16_to_cpu(getstatus->status);
|
||||
out:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user