mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-26 04:02:04 -05:00
spi: sg2044-nor: fix signedness bug in sg2044_spifmc_write()
The "ret" variable needs to be signed for the error handling to work.
It should be type int, since it only holds zero and negative error
codes.
Fixes: de16c322ee ("spi: sophgo: add SG2044 SPI NOR controller driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Link: https://patch.msgid.link/4e16e1bf-e5fb-4771-bc92-c5cba9aac473@stanley.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
336a41c90c
commit
16c6cac246
@@ -216,7 +216,7 @@ static ssize_t sg2044_spifmc_write(struct sg2044_spifmc *spifmc,
|
||||
size_t xfer_size;
|
||||
const u8 *dout = op->data.buf.out;
|
||||
int i, offset;
|
||||
size_t ret;
|
||||
int ret;
|
||||
u32 reg;
|
||||
|
||||
reg = sg2044_spifmc_init_reg(spifmc);
|
||||
|
||||
Reference in New Issue
Block a user