i3c: master: Fix build error
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Fri, 17 Nov 2023 11:09:24 +0000 (13:09 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 17 Nov 2023 14:55:35 +0000 (15:55 +0100)
Fix build error caused by commit 2aac0bf4ebc8 ("i3c: Add fallback method
for GETMXDS CCC") which incorrectly access the "struct i3c_ccc_cmd_dest
dest" as pointer.

drivers/i3c/master.c: In function ‘i3c_master_getmxds_locked’:
drivers/i3c/master.c:1140:21: error: invalid type argument of ‘->’ (have ‘struct i3c_ccc_cmd_dest’)
 1140 |                 dest->payload.len -= 3;
      |                     ^~

Fixes: 2aac0bf4ebc8 ("i3c: Add fallback method for GETMXDS CCC")
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20231117110924.634280-1-jarkko.nikula@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/i3c/master.c

index 718b643cb54ddeaa37d029968cf0e13a044cac50..8b729ebae2a6ecf645ab34743121b4c7a575be6c 100644 (file)
@@ -1135,7 +1135,7 @@ static int i3c_master_getmxds_locked(struct i3c_master_controller *master,
                 * Retry when the device does not support max read turnaround
                 * while expecting shorter length from this CCC command.
                 */
-               dest->payload.len -= 3;
+               dest.payload.len -= 3;
                ret = i3c_master_send_ccc_cmd_locked(master, &cmd);
                if (ret)
                        goto out;