Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: amd-asf: Set cmd variable when encountering an error

In the event of ASF error during the transfer, update the cmd and exit
the process, as data processing is not performed when a command fails.

Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20250217090258.398540-2-Shyam-sundar.S-k@amd.com

authored by

Shyam Sundar S K and committed by
Andi Shyti
b719afaa 1505986a

+1 -1
+1 -1
drivers/i2c/busses/i2c-amd-asf-plat.c
··· 69 69 /* Check if no error bits are set in target status register */ 70 70 if (reg & ASF_ERROR_STATUS) { 71 71 /* Set bank as full */ 72 - cmd = 0; 72 + cmd = 1; 73 73 reg |= GENMASK(3, 2); 74 74 outb_p(reg, ASFDATABNKSEL); 75 75 } else {