]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
staging: iio: tsl2x7x: check return value from tsl2x7x_invoke_change()
authorBrian Masney <masneyb@onstation.org>
Thu, 6 Jul 2017 22:56:26 +0000 (18:56 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 9 Jul 2017 17:46:25 +0000 (18:46 +0100)
commit0503deb820b19ffdefa5b0cc6557b2d2a7fdfc5c
tree605747f544bc55f70f797e0ac985a58ef5f0f24d
parent36a28e4a613bba376959a1b698ae0e1b23d52b59
staging: iio: tsl2x7x: check return value from tsl2x7x_invoke_change()

The return value from tsl2x7x_invoke_change() was not checked in most
places in the driver. This patch adds the proper error checks. The
return values inside tsl2x7x_invoke_change() are now checked by
this patch as well.

Previously, if there was an error turning the chip back on, then the
driver would attempt to turn the chip off and incorrectly return
success. The code to power off the chip is removed by this patch
since we should fail fast.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/light/tsl2x7x.c