]> git.itanic.dy.fi Git - linux-stable/commit
iio: core: Return error for failed read_reg
authorMatt Fornero <matt.fornero@mathworks.com>
Tue, 5 Sep 2017 14:34:10 +0000 (16:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:27:34 +0000 (11:27 +0200)
commit2c29a386809087a98e97c9775f1febdc9de6ab02
tree2aa6c2a0294dcf572f3dd337a17ae40a1ed40e37
parentb86df98578ab321655a74e00f755e3636dcf5747
iio: core: Return error for failed read_reg

commit 3d62c78a6eb9a7d67bace9622b66ad51e81c5f9b upstream.

If an IIO device returns an error code for a read access via debugfs, it
is currently ignored by the IIO core (other than emitting an error
message). Instead, return this error code to user space, so upper layers
can detect it correctly.

Signed-off-by: Matt Fornero <matt.fornero@mathworks.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/industrialio-core.c