From 48d7187c98e80fdb8f22e759355d6edf81cb9bf7 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Sun, 20 Sep 2026 18:12:35 +0300 Subject: [PATCH] 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 Reviewed-by: Frank Li Link: https://patch.msgid.link/20260920151248.46936-6-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni --- drivers/i3c/master.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 425b98e6efaa..c50887b0b37d 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: