]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
spi: amlogic: Fix error checking on regmap_write call
authorColin Ian King <colin.i.king@gmail.com>
Sat, 13 Sep 2025 20:16:11 +0000 (21:16 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 15 Sep 2025 11:47:14 +0000 (12:47 +0100)
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 <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20250913201612.1338217-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-amlogic-spifc-a4.c

index 4ca8e82fdc67db7e6bec3f6ec001bb4efa2c0c09..4338d00e56a6e84f24220dd7b16769c086044070 100644 (file)
@@ -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;