From: Shyam Sundar S K Date: Mon, 17 Feb 2025 09:02:57 +0000 (+0530) Subject: i2c: amd-asf: Set cmd variable when encountering an error X-Git-Tag: v6.14.9~648 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=424eff16fc91946f26d631b844ab2ad6818c3607;p=thirdparty%2Fkernel%2Fstable.git i2c: amd-asf: Set cmd variable when encountering an error [ Upstream commit b719afaa1e5d88a1b51d76adf344ff4a48efdb45 ] 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 Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Signed-off-by: Andi Shyti Link: https://lore.kernel.org/r/20250217090258.398540-2-Shyam-sundar.S-k@amd.com Signed-off-by: Sasha Levin --- diff --git a/drivers/i2c/busses/i2c-amd-asf-plat.c b/drivers/i2c/busses/i2c-amd-asf-plat.c index 93ebec162c6dd..61bc714c28d70 100644 --- a/drivers/i2c/busses/i2c-amd-asf-plat.c +++ b/drivers/i2c/busses/i2c-amd-asf-plat.c @@ -69,7 +69,7 @@ static void amd_asf_process_target(struct work_struct *work) /* Check if no error bits are set in target status register */ if (reg & ASF_ERROR_STATUS) { /* Set bank as full */ - cmd = 0; + cmd = 1; reg |= GENMASK(3, 2); outb_p(reg, ASFDATABNKSEL); } else {