]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: do not ignore i2c errors
authorAndrey Gusakov <andrey.gusakov@cogentembedded.com>
Thu, 23 Sep 2021 17:22:16 +0000 (20:22 +0300)
committerBartosz Golaszewski <brgl@bgdev.pl>
Wed, 29 Sep 2021 18:40:15 +0000 (20:40 +0200)
commit3fbe13833df9b1a60504b3fc02574953334cde8f
treed571d6022f90aef4d3e54b4e0c7a85b44546258d
parent62d0c3c91d43890e76d06eab873e9ff46a58308c
gpio: pca953x: do not ignore i2c errors

Per gpio_chip interface, error shall be proparated to the caller.

Attempt to silent diagnostics by returning zero (as written in the
comment) is plain wrong, because the zero return can be interpreted by
the caller as the gpio value.

Cc: stable@vger.kernel.org
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-pca953x.c