summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r--fs/sysfs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 7c2867b44141..6c95628ea377 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -90,7 +90,7 @@ static ssize_t sysfs_kf_bin_read(struct kernfs_open_file *of, char *buf,
90 return 0; 90 return 0;
91 91
92 if (size) { 92 if (size) {
93 if (pos > size) 93 if (pos >= size)
94 return 0; 94 return 0;
95 if (pos + count > size) 95 if (pos + count > size)
96 count = size - pos; 96 count = size - pos;