diff options
author | Qasim Ijaz <qasdev00@gmail.com> | 2025-03-14 00:45:45 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-03-17 02:34:24 +0300 |
commit | 3c9403f150b70d76198e414d53c95e1698e3f99f (patch) | |
tree | a1764589cc4863095fb25b2ebcf47658ec7061e2 /lib/string_helpers.c | |
parent | 336a41c90c86b883aa06ed19f138eee19ddf9958 (diff) | |
download | linux-3c9403f150b70d76198e414d53c95e1698e3f99f.tar.xz |
spi: sophgo: fix incorrect type for ret in sg2044_spifmc_write()
The sg2044_spifmc_write() function uses 'ret' of unsigned type
size_t to capture return values from sg2044_spifmc_wait_xfer_size()
and sg2044_spifmc_wait_int(). Since these functions may return
negative error codes, using an unsigned type prevents proper
error detection, as size_t cannot represent negative values.
Change 'ret' to type int so that negative values are handled correctly.
Fixes: de16c322eefb ("spi: sophgo: add SG2044 SPI NOR controller driver")
Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
Link: https://patch.msgid.link/20250313214545.7444-1-qasdev00@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'lib/string_helpers.c')
0 files changed, 0 insertions, 0 deletions