iio: iio: Fix iio_channel_read return if channel havn't info
When xilinx-xadc is used with hwmon driver to read voltage, offset used for temperature is always applied whatever the channel. iio_channel_read must return an error to avoid offset for channel without IIO_CHAN_INFO_OFFSET property. Signed-off-by: NFabien Proriol <fabien.proriol@jdsu.com> Signed-off-by: NJonathan Cameron <jic23@kernel.org>
Showing
想要评论请 注册 或 登录