]> git.baikalelectronics.ru Git - kernel.git/commit
iio: ssp_sensors: fix error code in ssp_print_mcu_debug()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Sep 2021 10:53:33 +0000 (13:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Oct 2021 09:40:15 +0000 (11:40 +0200)
commitd7fab13b93b2382c59df71ee7c6557f357591c29
tree61edd413dd056184a1a0cf49b8a6328c5a5841bc
parent4fac2ddbaad3514c2d4098c7027357b6be2d5b57
iio: ssp_sensors: fix error code in ssp_print_mcu_debug()

commit 4170d3dd1467e9d78cb9af374b19357dc324b328 upstream.

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.

Reported-by: Jonathan Cameron <jic23@kernel.org>
Fixes: 2d08e61eaf01 ("iio: common: ssp_sensors: Add sensorhub driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20210914105333.GA11657@kili
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/common/ssp_sensors/ssp_spi.c