patch "iio: ssp_sensors: fix error code in ssp_print_mcu_debug()" added to staging-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 4170d3dd1467e9d78cb9af374b19357dc324b328 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Tue, 14 Sep 2021 13:53:33 +0300
Subject: iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
The ssp_print_mcu_debug() function should return negative error codes on error. Returning "length" is meaningless. This change does not affect runtime because the callers only care about zero/non-zero.
--- drivers/iio/common/ssp_sensors/ssp_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/common/ssp_sensors/ssp_spi.c +1 -1
@@ -137,7 +137,7 @@ static int ssp_print_mcu_debug(char *data_frame, int *data_index,if (length > received_len - *data_index || length <=0 ) {ssp_dbg ("[SSP]: MSG From MCU-invalid debug length(%d/%d)\n" , length, received_len); -return length ? length : -EPROTO ; +return -EPROTO ; }ssp_dbg ("[SSP]: MSG From MCU - %s\n" , &data_frame[*data_index]);
Signature · 1 line
2.33.0