Skip to content
Verified Commit 72b17676 authored by Gabor Juhos's avatar Gabor Juhos Committed by Mark Brown
Browse files

spi: spi-qpic-snand: return early on error from qcom_spi_io_op()



When submitting of the descriptors fails, it is quite likely that
the register read buffer contains no valid data. Even if the data
is valid the function returns with an error code anyway.

Change the code to return early if qcom_submit_descs() fails to
avoid superfluously copying possibly invalid data.

Also change the return statement at the end of the function to use
zero value to indicate success obviusly.

Signed-off-by: default avatarGabor Juhos <j4g8y7@gmail.com>
Link: https://patch.msgid.link/20250515-qpic-snand-early-error-v1-1-681c87611213@gmail.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e7f3d115
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment