Akinobu Mita a6fe5e52d5 iio: adc: ti-ads1015: don't return invalid value from buffer setup callbacks
pm_runtime_get_sync() and pm_runtime_put_autosuspend() return 0 on
success, 1 if the device's runtime PM status was already requested status
or error code on failure.  So a positive return value doesn't indicate an
error condition.

However, any non-zero return values from buffer preenable and postdisable
callbacks are recognized as an error and this driver reuses the return
value from pm_runtime_get_sync() and pm_runtime_put_autosuspend() in
these callbacks.  This change fixes the false error detections.

Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-08-20 15:41:14 +01:00
..
2017-07-20 14:56:46 -07:00
2017-07-13 08:03:30 -06:00
2017-07-09 18:48:37 -07:00
2017-07-07 13:55:45 -07:00
2017-07-08 12:36:50 -07:00
2017-07-04 14:28:22 -07:00
2017-07-17 15:00:47 +02:00
2017-07-03 20:55:59 -07:00
2017-07-12 10:00:04 -07:00
2017-07-06 11:32:40 -07:00
2017-07-09 18:48:37 -07:00
2017-07-04 14:47:47 -07:00
2017-07-11 09:55:47 -07:00
2017-07-07 13:55:45 -07:00
2017-07-14 13:10:06 -07:00
2017-07-13 12:07:44 -07:00
2017-07-01 14:30:39 -07:00
2017-07-05 21:46:42 +02:00
2017-07-14 22:24:25 -07:00
2017-07-13 11:49:52 -07:00
2017-07-05 17:09:27 -07:00
2017-07-04 14:47:47 -07:00
2017-07-06 15:38:31 -07:00
2017-07-13 12:15:06 -07:00
2017-07-17 12:26:12 -07:00
2017-07-04 14:47:47 -07:00
2017-07-20 14:40:36 +02:00
2017-07-03 20:27:48 -07:00
2017-07-13 12:23:54 -07:00