From: Colin Ian King Date: Sat, 13 Sep 2025 20:16:11 +0000 (+0100) Subject: spi: amlogic: Fix error checking on regmap_write call X-Git-Tag: v6.18-rc1~165^2~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18dda9eb9e11b2aeec73cbe2a56ab2f862841ba4;p=thirdparty%2Fkernel%2Flinux.git spi: amlogic: Fix error checking on regmap_write call Currently a call to regmap_write is not being error checked because the return checke is being performed on the variable ret and this variable is not assigned the return value from the regmap_write call. Fix this by adding in the missing assignment. Fixes: 4670db6f32e9 ("spi: amlogic: add driver for Amlogic SPI Flash Controller") Signed-off-by: Colin Ian King Link: https://patch.msgid.link/20250913201612.1338217-1-colin.i.king@gmail.com Signed-off-by: Mark Brown --- diff --git a/drivers/spi/spi-amlogic-spifc-a4.c b/drivers/spi/spi-amlogic-spifc-a4.c index 4ca8e82fdc67d..4338d00e56a6e 100644 --- a/drivers/spi/spi-amlogic-spifc-a4.c +++ b/drivers/spi/spi-amlogic-spifc-a4.c @@ -420,7 +420,7 @@ static int aml_sfc_dma_buffer_setup(struct aml_sfc *sfc, void *databuf, goto out_map_data; cmd = CMD_DATA_ADDRH(sfc->daddr); - regmap_write(sfc->regmap_base, SFC_CMD, cmd); + ret = regmap_write(sfc->regmap_base, SFC_CMD, cmd); if (ret) goto out_map_data;