gpio: pca953x: do not ignore i2c errors
authorAndrey Gusakov <andrey.gusakov@cogentembedded.com>
Thu, 23 Sep 2021 17:22:16 +0000 (20:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Oct 2021 13:55:48 +0000 (15:55 +0200)
commitbd4e446a6947528f6ea7e0e7f19031a4389a4017
tree8d357786d759b83cf17b45646c9d51af09eb42a5
parent516d9055039017a20a698103be2b556b4c976bb8
gpio: pca953x: do not ignore i2c errors

commit 540cffbab8b8e6c52a4121666ca18d6e94586ed2 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-pca953x.c