Unverified Commit 3c9403f1 authored by Qasim Ijaz's avatar Qasim Ijaz Committed by Mark Brown
Browse files

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: de16c322 ("spi: sophgo: add SG2044 SPI NOR controller driver")
Signed-off-by: default avatarQasim Ijaz <qasdev00@gmail.com>
Link: https://patch.msgid.link/20250313214545.7444-1-qasdev00@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 336a41c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment