Skip to content

Commit

Permalink
local: Fix reading of empty attributes
Browse files Browse the repository at this point in the history
This partially reverts 3fa8e97. This commit is from 2014, I have no
idea why we wanted -EIO for empty attributes. Maybe I thought that this
would never happen.

Fixes #1061.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
pcercuei committed Oct 10, 2023
1 parent 4aa6e20 commit bacf087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion local.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static ssize_t local_read_dev_attr(const struct iio_device *dev,
if (ferror(f))
ret = -errno;
fclose(f);
return ret ? ret : -EIO;
return ret;
}

static ssize_t local_write_dev_attr(const struct iio_device *dev,
Expand Down

0 comments on commit bacf087

Please sign in to comment.