diff --git a/drivers/i3c/i3c_cdns.c b/drivers/i3c/i3c_cdns.c index 6ca92581595877..0862cd90e871f2 100644 --- a/drivers/i3c/i3c_cdns.c +++ b/drivers/i3c/i3c_cdns.c @@ -1302,7 +1302,7 @@ static void cdns_i3c_complete_transfer(const struct device *dev) } for (int i = 0; i < data->xfer.num_cmds; i++) { - switch (data->xfer.cmds->error) { + switch (data->xfer.cmds[i].error) { case CMDR_NO_ERROR: break;