|
@@ -310,8 +310,10 @@ static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf,
|
|
ret = indio_dev->info->debugfs_reg_access(indio_dev,
|
|
ret = indio_dev->info->debugfs_reg_access(indio_dev,
|
|
indio_dev->cached_reg_addr,
|
|
indio_dev->cached_reg_addr,
|
|
0, &val);
|
|
0, &val);
|
|
- if (ret)
|
|
|
|
|
|
+ if (ret) {
|
|
dev_err(indio_dev->dev.parent, "%s: read failed\n", __func__);
|
|
dev_err(indio_dev->dev.parent, "%s: read failed\n", __func__);
|
|
|
|
+ return ret;
|
|
|
|
+ }
|
|
|
|
|
|
len = snprintf(buf, sizeof(buf), "0x%X\n", val);
|
|
len = snprintf(buf, sizeof(buf), "0x%X\n", val);
|
|
|
|
|