[PATCH V2 05/17] i3c: master: Remove stale GETSTATUS length check
From: Adrian Hunter
Date: Thu Sep 17 2026 - 16:39:26 EST
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@xxxxxxxxx>
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
---
Changes in V2:
Added Frank Li's Reviewed-by tag.
drivers/i3c/master.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 215a22f2c7b6..4296c51a9537 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -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:
--
2.53.0